fixed-data-table-2
Advanced tools
Comparing version 0.8.23 to 0.8.24
@@ -151,5 +151,5 @@ <!-- File generated from "src/FixedDataTableColumn.js" --> | ||
Whether the column can be resized. | ||
Please note that if a column has a flex grow, once you resize | ||
the column, this will be set to 0. | ||
Whether the column can be resized with the | ||
FixedDataTableColumnResizeHandle. Please note that if a column | ||
has a flex grow, once you resize the column this will be set to 0. | ||
@@ -170,2 +170,17 @@ This property only provides the UI for the column resizing. If this | ||
### `allowCellsRecycling` | ||
Whether cells in this column can be removed from document when outside | ||
of viewport as a result of horizontal scrolling. | ||
Setting this property to true allows the table to not render cells in | ||
particular column that are outside of viewport for visible rows. This | ||
allows to create table with many columns and not have vertical scrolling | ||
performance drop. | ||
Setting the property to false will keep previous behaviour and keep | ||
cell rendered if the row it belongs to is visible. | ||
type: `bool` | ||
defaultValue: `false` | ||
### `pureRendering` | ||
@@ -172,0 +187,0 @@ |
@@ -143,2 +143,3 @@ <!-- File generated from "src/FixedDataTable.js" --> | ||
type: `bool` | ||
defaultValue: `true` | ||
@@ -149,2 +150,3 @@ | ||
type: `bool` | ||
defaultValue: `true` | ||
@@ -219,3 +221,3 @@ | ||
rowIndex; number // (the row index) | ||
height: number // (supplied from subRowHeight or subRowHeightGetter) | ||
height: number // (supplied from the Table or rowHeightGetter) | ||
width: number // (supplied from the Table) | ||
@@ -255,2 +257,3 @@ } | ||
type: `number` | ||
defaultValue: `0` | ||
@@ -263,2 +266,3 @@ | ||
type: `number` | ||
defaultValue: `0` | ||
@@ -293,2 +297,3 @@ | ||
type: `number` | ||
defaultValue: `0` | ||
@@ -340,19 +345,2 @@ | ||
### `stopReactWheelPropagation` | ||
If enabled scroll events will not be propagated outside of the table. | ||
type: `bool` | ||
### `stopScrollDefaultHandling` | ||
If enabled scroll events will never be bubbled to the browser default handler. | ||
If disabled (default when unspecified), scroll events will be bubbled up if the scroll | ||
doesn't lead to a change in scroll offsets, which is preferable if you like | ||
the page/container to scroll up when the table is already scrolled up max. | ||
type: `bool` | ||
### `stopScrollPropagation` | ||
@@ -382,5 +370,5 @@ | ||
### `onRowContextMenu` | ||
### `onRowDoubleClick` | ||
Callback that is called when a contextual-menu event happens on a row. | ||
Callback that is called when a row is double clicked. | ||
@@ -390,5 +378,5 @@ type: `func` | ||
### `onRowDoubleClick` | ||
### `onRowContextMenu` | ||
Callback that is called when a row is double clicked. | ||
Callback that is called when a contextual-menu event happens on a row. | ||
@@ -503,11 +491,1 @@ type: `func` | ||
### `elementHeights` | ||
defaultValue: `{ | ||
cellGroupWrapperHeight: undefined, | ||
footerHeight: 0, | ||
groupHeaderHeight: 0, | ||
headerHeight: 0, | ||
}` | ||
@@ -612,12 +612,8 @@ 'use strict'; | ||
componentWillReceiveProps: function componentWillReceiveProps( /*object*/nextProps) { | ||
var newOverflowX = nextProps.overflowX; | ||
var newOverflowY = nextProps.overflowY; | ||
// In the case of controlled scrolling, notify. | ||
if (this.props.ownerHeight !== nextProps.ownerHeight || this.props.scrollTop !== nextProps.scrollTop || this.props.scrollLeft !== nextProps.scrollLeft) { | ||
this._didScrollStart(); | ||
this._didScrollStop(); | ||
} | ||
this.setState(this._calculateState(nextProps, this.state)); | ||
this.setState(this._calculateState(nextProps, this.state), this._didScrollStop); | ||
}, | ||
@@ -1313,2 +1309,5 @@ componentDidUpdate: function componentDidUpdate() { | ||
} | ||
var newState = {}; | ||
var x = this.state.scrollX; | ||
@@ -1320,3 +1319,3 @@ if (Math.abs(deltaY) > Math.abs(deltaX) && this.props.overflowY !== 'hidden') { | ||
var maxScrollY = Math.max(0, scrollState.contentHeight - this.state.bodyHeight); | ||
this.setState({ | ||
newState = { | ||
firstRowIndex: scrollState.index, | ||
@@ -1327,3 +1326,3 @@ firstRowOffset: scrollState.offset, | ||
maxScrollY: maxScrollY | ||
}); | ||
}; | ||
} | ||
@@ -1340,9 +1339,9 @@ } else if (deltaX && this.props.overflowX !== 'hidden') { | ||
if (onHorizontalScroll ? onHorizontalScroll(roundedX) : true) { | ||
this.setState({ | ||
newState = { | ||
scrollX: roundedX | ||
}); | ||
}; | ||
} | ||
} | ||
this._didScrollStop(); | ||
this.setState(newState, this._didScrollStop); | ||
}, | ||
@@ -1358,2 +1357,4 @@ _onHorizontalScroll: function _onHorizontalScroll( /*number*/scrollPos) { | ||
var newState = {}; | ||
var roundedScrollPos = Math.round(scrollPos); | ||
@@ -1363,7 +1364,7 @@ | ||
if (onHorizontalScroll ? onHorizontalScroll(roundedScrollPos) : true) { | ||
this.setState({ | ||
newState = { | ||
scrollX: roundedScrollPos | ||
}); | ||
}; | ||
} | ||
this._didScrollStop(); | ||
this.setState(newState, this._didScrollStop); | ||
}, | ||
@@ -1378,2 +1379,3 @@ _onVerticalScroll: function _onVerticalScroll( /*number*/scrollPos) { | ||
} | ||
var newState = {}; | ||
var scrollState = this._scrollHelper.scrollTo(Math.round(scrollPos)); | ||
@@ -1383,3 +1385,3 @@ | ||
if (onVerticalScroll ? onVerticalScroll(scrollState.position) : true) { | ||
this.setState({ | ||
newState = { | ||
firstRowIndex: scrollState.index, | ||
@@ -1389,5 +1391,5 @@ firstRowOffset: scrollState.offset, | ||
scrollContentHeight: scrollState.contentHeight | ||
}); | ||
this._didScrollStop(); | ||
}; | ||
} | ||
this.setState(newState, this._didScrollStop); | ||
}, | ||
@@ -1394,0 +1396,0 @@ _didScrollStart: function _didScrollStart() { |
@@ -39,3 +39,3 @@ /** | ||
FixedDataTableRoot.version = '0.8.23'; | ||
FixedDataTableRoot.version = '0.8.24'; | ||
module.exports = FixedDataTableRoot; |
@@ -92,3 +92,3 @@ /** | ||
// if shift is held, swap the axis of scrolling. | ||
if (event.shiftKey) { | ||
if (event.shiftKey && this._allowInternalAxesSwap()) { | ||
normalizedEvent = this._swapNormalizedWheelAxis(normalizedEvent); | ||
@@ -148,2 +148,7 @@ } | ||
} | ||
}], [{ | ||
key: '_allowInternalAxesSwap', | ||
value: function _allowInternalAxesSwap() /*boolean*/{ | ||
return navigator.platform !== "MacIntel"; | ||
} | ||
}]); | ||
@@ -150,0 +155,0 @@ |
{ | ||
"name": "fixed-data-table-2", | ||
"version": "0.8.23", | ||
"version": "0.8.24", | ||
"description": "A React table component designed to allow presenting thousands of rows of data.", | ||
@@ -5,0 +5,0 @@ "main": "main.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
1519683
125
21835