Skip to content

Commit

Permalink
Version 0.7.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamran Asif committed Mar 8, 2017
1 parent c981cc0 commit 598f4c6
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 17 deletions.
2 changes: 1 addition & 1 deletion dist/fixed-data-table-base.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* FixedDataTable v0.7.11
* FixedDataTable v0.7.12
*
* Copyright Schrodinger, LLC
* All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion dist/fixed-data-table-base.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/fixed-data-table-style.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* FixedDataTable v0.7.11
* FixedDataTable v0.7.12
*
* Copyright Schrodinger, LLC
* All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion dist/fixed-data-table-style.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/fixed-data-table.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* FixedDataTable v0.7.11
* FixedDataTable v0.7.12
*
* Copyright Schrodinger, LLC
* All rights reserved.
Expand Down
22 changes: 17 additions & 5 deletions dist/fixed-data-table.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* FixedDataTable v0.7.11
* FixedDataTable v0.7.12
*
* Copyright Schrodinger, LLC
* All rights reserved.
Expand Down Expand Up @@ -208,7 +208,7 @@ return /******/ (function(modules) { // webpackBootstrap
Table: _FixedDataTable2.default
};

FixedDataTableRoot.version = '0.7.11';
FixedDataTableRoot.version = '0.7.12';
module.exports = FixedDataTableRoot;

/***/ },
Expand Down Expand Up @@ -460,6 +460,12 @@ return /******/ (function(modules) { // webpackBootstrap
*/
rowClassNameGetter: PropTypes.func,

/**
* If specified, `rowKeyGetter(index)` is called for each row and the
* returned value overrides `key` for the particular row.
*/
rowKeyGetter: PropTypes.func,

/**
* Pixel height of the column group header.
*/
Expand Down Expand Up @@ -861,6 +867,7 @@ return /******/ (function(modules) { // webpackBootstrap
rowsCount: state.rowsCount,
rowGetter: state.rowGetter,
rowHeightGetter: state.rowHeightGetter,
rowKeyGetter: state.rowKeyGetter,
scrollLeft: state.scrollX,
scrollableColumns: state.bodyScrollableColumns,
showLastRowBorder: true,
Expand Down Expand Up @@ -1071,10 +1078,13 @@ return /******/ (function(modules) { // webpackBootstrap

var groupHeaderHeight = useGroupHeader ? props.groupHeaderHeight : 0;

if (oldState && (props.rowsCount !== oldState.rowsCount || props.rowHeight !== oldState.rowHeight)) {
if (oldState && (props.rowsCount !== oldState.rowsCount || props.rowHeight !== oldState.rowHeight || props.height !== oldState.height)) {
// Number of rows changed, try to scroll to the row from before the
// change
var viewportHeight = (props.height === undefined ? props.maxHeight : props.height) - (props.headerHeight || 0) - (props.footerHeight || 0) - (props.groupHeaderHeight || 0);

var oldViewportHeight = this._scrollHelper._viewportHeight;

this._scrollHelper = new _FixedDataTableScrollHelper2.default(props.rowsCount, props.rowHeight, viewportHeight, props.rowHeightGetter);
scrollState = this._scrollHelper.scrollToRow(firstRowIndex, firstRowOffset);
firstRowIndex = scrollState.index;
Expand All @@ -1085,7 +1095,7 @@ return /******/ (function(modules) { // webpackBootstrap
}

var lastScrollToRow = oldState ? oldState.scrollToRow : undefined;
if (props.scrollToRow != null && props.scrollToRow !== lastScrollToRow) {
if (props.scrollToRow != null && (props.scrollToRow !== lastScrollToRow || viewportHeight !== oldViewportHeight)) {
scrollState = this._scrollHelper.scrollRowIntoView(props.scrollToRow);
firstRowIndex = scrollState.index;
firstRowOffset = scrollState.offset;
Expand Down Expand Up @@ -3948,6 +3958,7 @@ return /******/ (function(modules) { // webpackBootstrap
rowClassNameGetter: PropTypes.func,
rowsCount: PropTypes.number.isRequired,
rowHeightGetter: PropTypes.func,
rowKeyGetter: PropTypes.func,
rowPositionGetter: PropTypes.func.isRequired,
scrollLeft: PropTypes.number.isRequired,
scrollableColumns: PropTypes.array.isRequired,
Expand Down Expand Up @@ -4021,11 +4032,12 @@ return /******/ (function(modules) { // webpackBootstrap
var rowIndex = rowsToRender[i];
var currentRowHeight = this._getRowHeight(rowIndex);
var rowOffsetTop = baseOffsetTop + rowPositions[rowIndex];
var rowKey = props.rowKeyGetter ? props.rowKeyGetter(rowIndex) : i;

var hasBottomBorder = rowIndex === props.rowsCount - 1 && props.showLastRowBorder;

this._staticRowArray[i] = _React2.default.createElement(_FixedDataTableRow2.default, {
key: i,
key: rowKey,
isScrolling: props.isScrolling,
index: rowIndex,
width: props.width,
Expand Down
2 changes: 1 addition & 1 deletion dist/fixed-data-table.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions dist/fixed-data-table.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fixed-data-table-2",
"version": "0.7.11",
"version": "0.7.12",
"description": "A React table component designed to allow presenting thousands of rows of data.",
"main": "main.js",
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/FixedDataTableRoot.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ var FixedDataTableRoot = {
Table: FixedDataTable,
};

FixedDataTableRoot.version = '0.7.11';
FixedDataTableRoot.version = '0.7.12';
module.exports = FixedDataTableRoot;

0 comments on commit 598f4c6

Please sign in to comment.