File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 box-sizing : border-box;
1818 }
1919 </ style >
20- < script src ="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.7/react-with-addons.min .js "> </ script >
21- < script src ="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.7/react-dom.min. js "> </ script >
20+ < script src ="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.7/react.js "> </ script >
21+ < script src ="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.7/react-dom.js "> </ script >
2222 < script src ="../dist/umd/react-virtualized.js "> </ script >
2323</ head >
2424< body >
Original file line number Diff line number Diff line change 11function renderCell ( params ) {
2- // return React.DOM.span(null, `column:${params.columnIndex}, row:${params.rowIndex}`)
32 return React . DOM . input ( {
43 className : 'input' ,
54 onChange : function ( ) { } ,
65 defaultValue : `column:${ params . columnIndex } , row:${ params . rowIndex } `
76 } )
87}
98
10- /*
11- function measurePerformance () {
12- console.log('measurePerformance()')
13- var measurements = React.addons.Perf.getLastMeasurements()
14- if (measurements.length > 0) {
15- console.group('printDOM')
16- React.addons.Perf.printDOM(measurements)
17- console.groupEnd()
18-
19- console.group('printWasted')
20- React.addons.Perf.printWasted(measurements)
21- console.groupEnd()
22-
23- React.addons.Perf.start()
24- }
25- }
26- */
27-
289var App = React . createClass ( {
29- componentDidMount : function ( ) {
30- // React.addons.Perf.start()
31- // window.Perf = React.addons.Perf
32- } ,
33-
3410 render : function ( ) {
3511 return React . createElement (
3612 ReactVirtualized . AutoSizer ,
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ export default class AutoSizer extends Component {
4141 }
4242
4343 this . _onResize = this . _onResize . bind ( this )
44+ this . _onScroll = this . _onScroll . bind ( this )
4445 this . _setRef = this . _setRef . bind ( this )
4546 }
4647
@@ -77,6 +78,7 @@ export default class AutoSizer extends Component {
7778 return (
7879 < div
7980 ref = { this . _setRef }
81+ onScroll = { this . _onScroll }
8082 style = { outerStyle }
8183 >
8284 { children ( { height, width } ) }
@@ -102,6 +104,11 @@ export default class AutoSizer extends Component {
102104 onResize ( { height, width } )
103105 }
104106
107+ _onScroll ( event ) {
108+ // Prevent detectElementResize library from being triggered by this scroll event.
109+ event . stopPropagation ( )
110+ }
111+
105112 _setRef ( autoSizer ) {
106113 // In case the component has been unmounted
107114 this . _parentNode = autoSizer && autoSizer . parentNode
Original file line number Diff line number Diff line change 55 overflow : auto;
66 outline : 0 ;
77 -webkit-overflow-scrolling : touch;
8+
9+ /* Without this property, Chrome repaints the entire Grid any time a new row or column is added.
10+ Firefox only repaints the new row or column (regardless of this property).
11+ Safari and IE don't support the property at all. */
12+ will-change : transform;
813}
914
1015.Grid__innerScrollContainer {
Original file line number Diff line number Diff line change 55 overflow : auto;
66 outline : 0 ;
77 -webkit-overflow-scrolling : touch;
8+
9+ /* Without this property, Chrome repaints the entire Grid any time a new row or column is added.
10+ Firefox only repaints the new row or column (regardless of this property).
11+ Safari and IE don't support the property at all. */
12+ will-change : transform;
813}
914
1015.Grid__innerScrollContainer {
You can’t perform that action at this time.
0 commit comments