react-virtualized
Advanced tools
Comparing version 1.0.0 to 1.0.1
Changelog | ||
------------ | ||
#### 1.0.0 | ||
Package JSON updated so that "main" entry points to `dist/react-virtualized.js` to provide easier integration for users that don't want Babel/Webpack to have to process their `node_modules` folder. | ||
#### 0.0.4 | ||
@@ -5,0 +8,0 @@ Added keypress scrolling support. |
@@ -6,3 +6,3 @@ { | ||
"user": "bvaughn", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"scripts": { | ||
@@ -9,0 +9,0 @@ "build": "npm run build:demo && npm run build:dist", |
@@ -15,2 +15,4 @@ Demos available here: | ||
Below is a simple `VirtualScroll` example. Each row in the virtualized list is rendered through the use of a `rowRenderer` function for performance reasons. This function must return an element with a unique `key` and must fit within the specified `rowHeight`. | ||
```javascript | ||
@@ -34,3 +36,9 @@ import React from 'react'; | ||
rowHeight={20} | ||
rowRenderer={index => list[index]} | ||
rowRenderer={ | ||
index => ( | ||
<div key={index}> | ||
{list[index].name} | ||
</div> | ||
) | ||
} | ||
/>, | ||
@@ -43,2 +51,4 @@ document.getElementById('example') | ||
Below is a very basic `FlexTable` example. This table has only 2 columns, each containing a simple string. Both have a fixed width and neither is sortable. [See here](blob/master/source/FlexTable/FlexTable.example.js) for a more full-featured example including custom cell renderers, sortable headers, and more. | ||
```javascript | ||
@@ -45,0 +55,0 @@ import React from 'react'; |
/** @flow */ | ||
import shouldPureComponentUpdate from 'react-pure-render/function' | ||
import React, { Component, PropTypes } from 'react' | ||
import { findDOMNode } from 'react-dom' | ||
import cn from 'classnames' | ||
@@ -63,3 +64,8 @@ import raf from 'raf' | ||
this._scrollingContainer = this.refs.scrollingContainer.getDOMNode() | ||
// React v0.14 requires ReactDOM.findDOMNode but earlier versions use getDOMNode() | ||
if (findDOMNode instanceof Function) { | ||
this._scrollingContainer = findDOMNode(this.refs.scrollingContainer) | ||
} else { | ||
this._scrollingContainer = this.refs.scrollingContainer.getDOMNode() | ||
} | ||
@@ -66,0 +72,0 @@ if (scrollToIndex >= 0) { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
211488
3106
103