Replaced single occurence of Number.isNaN
with isNaN
to avoid IE compatibility issues. Maybe in the future I will add a polyfill dependency but I did not intend to introduce this without a major version bump so I'm removing it.
Removes event.stopPropagation
since it was unnecessary to prevent keyboard event bubbling, only to prevent the default browser behavior.
Relocated a couple of static style properties from inline style object to exported CSS file for easier customization.
Added Grid__cell
and VirtualScroll__row
classes.
Added onScroll
callback to Grid
, FlexTable
, and VirtualScroll
.
Added scrollToCell
method to Grid
and scrollToRow
to FlexTable
, and VirtualScroll
.
Added -ms-flex
and -webkit-flex
browser prefixes to FlexTable
cells.
Fixed invalid function reference in Grid
triggered by specifying an initial scrollToRow
property.
Fixed distribution to include new Grid
component as an export.
Added new Grid
component for virtualizing rows and columns .
Updated AutoSizer
component to support managing only width
or height
(in addition to both).
Fixed small CSS property misnaming issue.
FlexTable
now supports dynamic row-heights (in the same way as VirtualScroll
).
Set VirtualScroll
default style to width: 100%
to be more inline with default FlexTable
behavior.
Replaced React.cloneElement
with wrapper element in order to:
- Better support for pure function components; (they were not compatible with inline style positioning).
- Relax the requirement of
rowRenderer
having to specify akey
. - Support
React.PropTypes.node
children (including plain strings, numbers, etc.) instead of just elements.
Added -webkit-overflow-scrolling: touch
for smoother inertial scrolling on mobile devices.
Additional columnData
parameter passed to onHeaderClick
callback.
Removed an unused dependency on 'inline-style-prefixer' from the package.json
.
CSS styles have been split into their own, separately loaded stylesheet. This simplifies universal/isomorphic use cases without breaking vendor prefixing. This change means that you'll need to import the following additional file. This only needs to be done once (usually during bootstrapping).
import 'react-virtualized/styles.css';
In this release the width
property of the FlexTable
component was removed. Tables will now grow to fill 100% of the width of their parent container.
The AutoSizer
's ChildComponent
attribute has been removed in favor of using a regular react child. For example:
<AutoSizer
ChildComponent={VirtualScroll}
{...props}
/>
Should instead be this:
<AutoSizer>
<VirtualScroll {...props}/>
</AutoSizer>
New onHeaderClick
property added to FlexTable
. Thanks to @olslash for the contribution!
Added high-order InfiniteLoader
component to manage just-in-time fetching of data as a user scrolls up or down in a list.
For more information about this component refer to the API docs.
Fixed small NPE when up/down arrow key was used while an empty VirtualScroll was in-focus.
CSS styles have been split into two groups: functional styles (eg. position
, overflow
) and presentational styles (eg. text-transform
, color
) and both have been converted to inline styles rather than being loaded as CSS. This was done primarily to simplify usage for universal/isomorphic rendering.
For more information on customizing styles refer to the documentation...
Changed Autosizer
component to support a single child instead of the ChildComponent
property.
(For backwards compatibility purposes the ChildComponent
property will continue to be supported.)
Defer loading of element resize code until componentDidMount
to avoid undefined document
and body
references.
This was breaking server-side rendering.
Uglify dist build to remove dead code.
Improved checks for undefined document
and window
in hopes of better supporting server-side rendering.
Replaced invalid rowHeight instanceof Number
check with typeof rowHeight === 'number'
in VirtualScroll
.
Moved onRowsRendered
to componentDidUpdate
(instead of render
) to keep render
free of side-effects.
Added tests to ensure that the callback is only invoked once per start/stop index pair (and not again unless the indices change).
Added check for undefined document
before accessing attachEvent
to avoid causing problems with server-side rendering.
Cell title
now only set if rendered cell contents are a string. This fixes issue #35.
VirtualScroll
and FlexTable
now support dynamic row heights by accepting a function as the rowHeight
property.
Added AutoSizer
component for wrapping FlexTable
or VirtualScroll
and growing to fill the parent container. This should hopefully simplify usage of these components.
FlexTable
and VirtualScroll
offer new callback property onRowsRendered
to be invoked with a params object { startIndex, stopIndex }
after rows have been rendered.
FlexTable
's rowClassName
property can now be either a string or a function in order to support dynamic row classes (eg. alternating colors).
Added onRowClick
property to FlexTable
.
Fixed a few minor FlexTable font styles to use relative sizes instead of custom ones
Added optional noRowsRenderer
property to VirtualScroll
and FlexTable
.
This property can be used to render loading indicators or placeholder content for empty lists.
Set shouldPureComponentUpdate
on component prototypes instead of instances.
Dropped half-ass support for React 0.13. This module has always depended on React 0.14 but it was checking in previous versions and trying to be backwards compatible with 0.13. Since that check is no longer in place, this is a major version bump (even though there is no real new functionality being added).
Fixed package.json dependencies by moving classnames
, raf
, and react-pure-render
out of peerDependencies
and into dependencies
.
Same as version 1.0.2; published just to update NPM keyword and description.
Removed default row-border styling from FlexTable and added new :rowClassName property.
Updated to use ReactDOM.findDOMNode instead of getDOMNode (but added backwards-compatible check for < React v0.14).
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.
Added keypress scrolling support.
Added "main" entry to package.json.
Added CSS auto-prefixing to support Safari and other, older browsers.
Initial release.