Conversation
| } | ||
|
|
||
| public componentDidUpdate(prevProps: IListPresenter<T, R>) { | ||
| if (prevProps.values !== this.props.values) { |
There was a problem hiding this comment.
What exactly does this do?
To me it does not make sense that you clear everything if any property of the filter changes.
There was a problem hiding this comment.
It sets page and perPage to initial values if a filter changes. It would be equivalent to this.setState({ page: 0, perPage: 20 }), but I reused the existing code so it doesn't get duplicated.
There was a problem hiding this comment.
But this seems wrong :)
I would expect that if you click on next pagination once filter is changed to get a dialog box which asks you do you want to restart the search (without reseting per page) or just continue searching using the old filter.
So you should maintain some invalidation flag which gets cleared on submit.
No description provided.