Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check changing of visible column #535

Open
wants to merge 4 commits into
base: v0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/gridTable.jsx.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,10 @@ var GridTable = React.createClass({
tableStyle.tableLayout = "fixed";
}

return React.createElement('div', null, React.createElement('table', { className: this.props.className, style: this.props.useGriddleStyles && tableStyle || null }, tableHeading), React.createElement('div', { ref: 'scrollable', onScroll: this.gridScroll, style: gridStyle }, React.createElement('table', { className: this.props.className, style: this.props.useGriddleStyles && tableStyle || null }, nodes, loadingContent, pagingContent)));
return React.createElement('div', {className: 'table-responsive'}, React.createElement('table', { className: this.props.className, style: this.props.useGriddleStyles && tableStyle || null }, tableHeading), React.createElement('div', { className: 'table-responsive', ref: 'scrollable', onScroll: this.gridScroll, style: gridStyle }, React.createElement('table', { className: this.props.className, style: this.props.useGriddleStyles && tableStyle || null }, nodes, loadingContent, pagingContent)));
}

return React.createElement('div', { ref: 'scrollable', onScroll: this.gridScroll, style: gridStyle }, React.createElement('table', { className: this.props.className, style: this.props.useGriddleStyles && tableStyle || null }, tableHeading, nodes, loadingContent, pagingContent));
return React.createElement('div', { className: 'table-responsive', ref: 'scrollable', onScroll: this.gridScroll, style: gridStyle }, React.createElement('table', { className: this.props.className, style: this.props.useGriddleStyles && tableStyle || null }, tableHeading, nodes, loadingContent, pagingContent));
}
});

Expand Down
5 changes: 4 additions & 1 deletion modules/griddle.jsx.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ var initial = require('lodash/initial');
var intersection = require('lodash/intersection');
var isArray = require('lodash/isArray');
var isEmpty = require('lodash/isEmpty');
var isEqual = require('lodash.isequal');
var isNull = require('lodash/isNull');
var isUndefined = require('lodash/isUndefined');
var omit = require('lodash/omit');
Expand Down Expand Up @@ -405,7 +406,9 @@ var Griddle = React.createClass({
} else if (this.columnSettings.allColumns.length > 0) {
this.columnSettings.allColumns = [];
}

if ( !isEqual(this.props.columns.slice().sort() , nextProps.columns.slice().sort())){
this.setColumns(nextProps.columns);
}
if (nextProps.selectedRowIds) {
var visibleRows = this.getDataForRender(this.getCurrentResults(nextProps.results), this.columnSettings.getColumns(), true);

Expand Down