Skip to content

Commit 902cf7f

Browse files
davimacedodouglasmuraoka
authored andcommitted
Fix: DataBrowser is not updating accordingly (#1276)
Removes `DataBrowser.react#shouldComponentUpdate` in order to fix: * Columns are not resizing * Menu is not updating when there is a row selection * Select all stopped working
1 parent 87dd271 commit 902cf7f

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/dashboard/Data/Browser/DataBrowser.react.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,23 +47,6 @@ export default class DataBrowser extends React.Component {
4747
this.saveOrderTimeout = null;
4848
}
4949

50-
shouldComponentUpdate(nextProps, nextState) {
51-
const shallowVerifyStates = [...new Set(Object.keys(this.state).concat(Object.keys(nextState)))]
52-
.filter(stateName => stateName !== 'order' && stateName !== 'copyableValue');
53-
if (shallowVerifyStates.some(stateName => this.state[stateName] !== nextState[stateName])) {
54-
return true;
55-
}
56-
if (JSON.stringify(this.state.order) !== JSON.stringify(nextState.order)) {
57-
return true;
58-
}
59-
const shallowVerifyProps = [...new Set(Object.keys(this.props).concat(Object.keys(nextProps)))]
60-
.filter(propName => propName !== 'columns');
61-
if (shallowVerifyProps.some(propName => this.props[propName] !== nextProps[propName])) {
62-
return true;
63-
}
64-
return JSON.stringify(this.props.columns) !== JSON.stringify(nextProps.columns);
65-
}
66-
6750
componentWillReceiveProps(props, context) {
6851
if (props.className !== this.props.className) {
6952
let order = ColumnPreferences.getOrder(

0 commit comments

Comments
 (0)