fixed-data-table-2
Advanced tools
Comparing version 0.8.21 to 0.8.22
@@ -151,5 +151,5 @@ <!-- File generated from "src/FixedDataTableColumn.js" --> | ||
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. | ||
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. | ||
@@ -156,0 +156,0 @@ This property only provides the UI for the column resizing. If this |
@@ -143,3 +143,2 @@ <!-- File generated from "src/FixedDataTable.js" --> | ||
type: `bool` | ||
defaultValue: `true` | ||
@@ -150,3 +149,2 @@ | ||
type: `bool` | ||
defaultValue: `true` | ||
@@ -221,3 +219,3 @@ | ||
rowIndex; number // (the row index) | ||
height: number // (supplied from the Table or rowHeightGetter) | ||
height: number // (supplied from subRowHeight or subRowHeightGetter) | ||
width: number // (supplied from the Table) | ||
@@ -257,6 +255,5 @@ } | ||
type: `number` | ||
defaultValue: `0` | ||
### `headerHeight` | ||
### `headerHeight` (required) | ||
@@ -266,3 +263,2 @@ Pixel height of header. | ||
type: `number` | ||
defaultValue: `0` | ||
@@ -297,3 +293,2 @@ | ||
type: `number` | ||
defaultValue: `0` | ||
@@ -345,2 +340,19 @@ | ||
### `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` | ||
@@ -370,5 +382,5 @@ | ||
### `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. | ||
@@ -378,5 +390,5 @@ type: `func` | ||
### `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. | ||
@@ -491,1 +503,11 @@ type: `func` | ||
### `elementHeights` | ||
defaultValue: `{ | ||
cellGroupWrapperHeight: undefined, | ||
footerHeight: 0, | ||
groupHeaderHeight: 0, | ||
headerHeight: 0, | ||
}` | ||
@@ -21,5 +21,3 @@ /** | ||
var SCROLL_END = exports.SCROLL_END = 'SCROLL_END'; | ||
var SCROLL_JUMP_X = exports.SCROLL_JUMP_X = 'SCROLL_JUMP_X'; | ||
var SCROLL_JUMP_Y = exports.SCROLL_JUMP_Y = 'SCROLL_JUMP_Y'; | ||
var SCROLL_TO_X = exports.SCROLL_TO_X = 'SCROLL_TO_X'; | ||
var SCROLL_TO_Y = exports.SCROLL_TO_Y = 'SCROLL_TO_Y'; |
@@ -69,4 +69,2 @@ /** | ||
var scrollJumpedX = scrollX != state.scrollX; | ||
return _extends({}, state, { | ||
@@ -76,4 +74,3 @@ columnResizingData: columnResizingData, | ||
maxScrollX: maxScrollX, | ||
scrollX: scrollX, | ||
scrollJumpedX: scrollJumpedX | ||
scrollX: scrollX | ||
}); | ||
@@ -80,0 +77,0 @@ }; |
@@ -56,3 +56,2 @@ /** | ||
* lastIndex: number, | ||
* scrollJumpedY: boolean, | ||
* }} scrollAnchor | ||
@@ -93,3 +92,2 @@ * @return {!Object} The updated state object | ||
} | ||
var scrollJumpedY = scrollAnchor.scrollJumpedY === true && scrollY !== state.scrollY; | ||
scrollY = (0, _clamp2.default)(scrollY, 0, maxScrollY); | ||
@@ -99,4 +97,3 @@ | ||
maxScrollY: maxScrollY, | ||
scrollY: scrollY, | ||
scrollJumpedY: scrollJumpedY | ||
scrollY: scrollY | ||
}); | ||
@@ -103,0 +100,0 @@ } |
@@ -39,3 +39,3 @@ /** | ||
FixedDataTableRoot.version = '0.8.21'; | ||
FixedDataTableRoot.version = '0.8.22'; | ||
module.exports = FixedDataTableRoot; |
@@ -120,4 +120,2 @@ /** | ||
scrollContentHeight: 0, | ||
scrollJumpedX: false, | ||
scrollJumpedY: false, | ||
scrollX: 0, | ||
@@ -181,2 +179,7 @@ scrollY: 0, | ||
// if scroll values have changed, then we're scrolling! | ||
if (_newState.scrollX !== state.scrollX || _newState.scrollY !== state.scrollY) { | ||
_newState.scrolling = _newState.scrolling || true; | ||
} | ||
// TODO REDUX_MIGRATION solve w/ evil-diff | ||
@@ -196,25 +199,6 @@ // TODO (jordan) check if relevant props unchanged and | ||
firstOffset: state.firstRowOffset, | ||
lastIndex: state.lastIndex, | ||
scrollJumpedY: state.scrollJumpedY | ||
lastIndex: state.lastIndex | ||
}; | ||
return (0, _computeRenderedRows2.default)(_newState2, previousScrollAnchor); | ||
} | ||
case ActionTypes.SCROLL_JUMP_X: | ||
{ | ||
return _extends({}, state, { | ||
scrollJumpedX: false | ||
}); | ||
} | ||
case ActionTypes.SCROLL_JUMP_Y: | ||
{ | ||
return _extends({}, state, { | ||
scrollJumpedY: false | ||
}); | ||
} | ||
case ActionTypes.SCROLL_START: | ||
{ | ||
return _extends({}, state, { | ||
scrolling: true | ||
}); | ||
} | ||
case ActionTypes.SCROLL_TO_Y: | ||
@@ -224,5 +208,7 @@ { | ||
var _scrollAnchor2 = (0, _scrollAnchor3.scrollTo)(state, scrollY); | ||
return (0, _computeRenderedRows2.default)(state, _scrollAnchor2); | ||
var _newState3 = _extends({}, state, { | ||
scrolling: true | ||
}); | ||
var _scrollAnchor2 = (0, _scrollAnchor3.scrollTo)(_newState3, scrollY); | ||
return (0, _computeRenderedRows2.default)(_newState3, _scrollAnchor2); | ||
} | ||
@@ -259,2 +245,3 @@ case ActionTypes.COLUMN_RESIZE: | ||
return _extends({}, state, { | ||
scrolling: true, | ||
scrollX: scrollX | ||
@@ -261,0 +248,0 @@ }); |
@@ -13,3 +13,3 @@ /** | ||
}); | ||
exports.jumpScrollY = exports.jumpScrollX = exports.stopScroll = exports.startScroll = exports.scrollToY = exports.scrollToX = undefined; | ||
exports.stopScroll = exports.startScroll = exports.scrollToY = exports.scrollToX = undefined; | ||
@@ -58,20 +58,2 @@ var _ActionTypes = require('././ActionTypes'); | ||
}; | ||
}; | ||
/** | ||
* Fire when fdt does a jump scroll due to a jump onto a row | ||
*/ | ||
var jumpScrollX = exports.jumpScrollX = function jumpScrollX() { | ||
return { | ||
type: _ActionTypes.SCROLL_JUMP_X | ||
}; | ||
}; | ||
/** | ||
* Fire when fdt does a jump scroll due to a jump onto a column | ||
*/ | ||
var jumpScrollY = exports.jumpScrollY = function jumpScrollY() { | ||
return { | ||
type: _ActionTypes.SCROLL_JUMP_Y | ||
}; | ||
}; |
@@ -51,3 +51,2 @@ /** | ||
* changed: boolean, | ||
* scrollJumpedY: boolean, | ||
* }} | ||
@@ -57,11 +56,7 @@ */ | ||
if (newProps.scrollToRow !== undefined && newProps.scrollToRow !== null && (!oldProps || newProps.scrollToRow !== oldProps.scrollToRow)) { | ||
var scrollAnchor = scrollToRow(state, newProps.scrollToRow); | ||
return (0, _set2.default)(scrollAnchor, 'scrollJumpedY', scrollAnchor.changed); | ||
return scrollToRow(state, newProps.scrollToRow); | ||
} | ||
if (newProps.scrollTop !== undefined && newProps.scrollTop !== null && (!oldProps || newProps.scrollTop !== oldProps.scrollTop)) { | ||
var _scrollAnchor = scrollTo(state, newProps.scrollTop); | ||
// 'changed' might give false positives to scrollJumpedY, | ||
// but that's fine as the final value is determined by computeRenderedRows. | ||
return (0, _set2.default)(_scrollAnchor, 'scrollJumpedY', _scrollAnchor.changed); | ||
return scrollTo(state, newProps.scrollTop); | ||
} | ||
@@ -73,4 +68,3 @@ | ||
lastIndex: undefined, | ||
changed: false, | ||
scrollJumpedY: false | ||
changed: false | ||
}; | ||
@@ -77,0 +71,0 @@ } |
@@ -200,3 +200,2 @@ 'use strict'; | ||
onTouchStart: this._onTouchStart, | ||
onWheel: this._wheelHandler.onWheel, | ||
className: mainClassName, | ||
@@ -222,2 +221,3 @@ ref: this.rootRef, | ||
componentDidMount: function componentDidMount() { | ||
this.root && this.root.addEventListener('wheel', this._wheelHandler.onWheel, { passive: false }); | ||
this._mouseMoveTracker = new _DOMMouseMoveTracker2.default(this._onMouseMove, this._onMouseMoveEnd, document.documentElement, this.props.touchEnabled); | ||
@@ -231,2 +231,3 @@ | ||
componentWillUnmount: function componentWillUnmount() { | ||
this.root && this.root.removeEventListener('wheel', this._wheelHandler.onWheel, { passive: false }); | ||
this._nextState = null; | ||
@@ -233,0 +234,0 @@ this._mouseMoveTracker.releaseMouseMoves(); |
{ | ||
"name": "fixed-data-table-2", | ||
"version": "0.8.21", | ||
"version": "0.8.22", | ||
"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
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
1237148
125
22125