Skip to content

Commit

Permalink
fix(react-grid): fix typo in action name (#2824)
Browse files Browse the repository at this point in the history
  • Loading branch information
ushkal authored Apr 15, 2020
1 parent c704fdf commit b1a4079
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ const defaultDeps = {
rows: [{ id: 1 }],
getRowId: row => row.id,
},
action: {
clearRowsCacheAction: () => {},
},
};

const defaultProps = {
Expand Down Expand Up @@ -210,9 +207,9 @@ describe('VirtualTableState', () => {
executeComputedAction(tree, actions => actions.changeColumnFilter({}));
jest.runAllTimers();

expect(getRows).toHaveBeenCalledTimes(1);
expect(getRows).toHaveBeenCalledTimes(2);
expect(getRows)
.toHaveBeenCalledWith(0, 100); // reload visible range
.toHaveBeenCalledWith(0, 100); // reload from top
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ class VirtualTableStateBase extends React.PureComponent<VirtualTableStateProps,
changeColumnFilterAction = (
_: any,
__: Getters,
{ clearRowsCacheAction }: Actions,
{ clearRowCache }: Actions,
) => {
this.setState({
requestedStartIndex: 0,
});
clearRowsCacheAction();
clearRowCache();
}

static getDerivedStateFromProps(nextProps, prevState) {
Expand Down

0 comments on commit b1a4079

Please sign in to comment.