Skip to content

Commit 888bd51

Browse files
committed
Fix insert button not updating:
When switching between collections with the same number of documents and same sample size, the sample message would not update. This was only noticable switching between a readonly view and a normal collection.
1 parent 4188d70 commit 888bd51

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

src/internal-packages/query/lib/component/sampling-message.jsx

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,6 @@ class SamplingMessage extends React.Component {
3434
this.unsubscribeLoadMore = this.loadMoreDocumentsStore.listen(this.handleLoadMore.bind(this));
3535
}
3636

37-
/**
38-
* Only update when the count changes.
39-
*
40-
* @param {Object} nextProps - The next properties.
41-
* @param {Object} nextState - The next state.
42-
*
43-
* @returns {Boolean} If the component should update.
44-
*/
45-
shouldComponentUpdate(nextProps, nextState) {
46-
return (nextState.count !== this.state.count) ||
47-
(nextState.loaded !== this.state.loaded) ||
48-
(nextProps.sampleSize !== this.props.sampleSize);
49-
}
50-
5137
/**
5238
* Unsibscribe from the document list store when unmounting.
5339
*/

0 commit comments

Comments
 (0)