-
Notifications
You must be signed in to change notification settings - Fork 932
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
Issue-857 Server Side Filters #913
Merged
gabrielliwerant
merged 13 commits into
master
from
enhancement/issue-857-server-side-filters
Oct 3, 2019
Merged
Issue-857 Server Side Filters #913
gabrielliwerant
merged 13 commits into
master
from
enhancement/issue-857-server-side-filters
Oct 3, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add type to onFilterChange callback to allow differentiation among filter types, adding a "reset" type for filter reset
Uses all of the additional functionality to create a new filter experience for serverside use cases
- filterList - customFilterDialogFooter - onFilterDialogOpen
This was referenced Sep 12, 2019
Closed
…o enhancement/issue-857-server-side-filters # Conflicts: # README.md # test/MUIDataTable.test.js # webpack.config.js
waqasajaz
pushed a commit
to waqasajaz/mui-datatables
that referenced
this pull request
Oct 31, 2019
* Add onFilterDialogOpen callback when filter dialog opens * Add customFilterDialogFooter for adding a footer to filter dialog * Allow filter chips update to trigger separate filter update type Add type to onFilterChange callback to allow differentiation among filter types, adding a "reset" type for filter reset * Minor enhancements * Add serverside filter example Uses all of the additional functionality to create a new filter experience for serverside use cases * Add tests for major functionality additions - filterList - customFilterDialogFooter - onFilterDialogOpen * Fire onFilterDialogOpen after setState for consistency with other callbacks * Add serverSideFilterList for chip display with serverside filters * Add tests for serverSideFilterList * Add onFilterDialogClose callback option * Add test for onFilterDialogClose * Add serverside filter example to new router setup
lalong13
pushed a commit
to lalong13/mui-datatables
that referenced
this pull request
Jan 15, 2020
* Add onFilterDialogOpen callback when filter dialog opens * Add customFilterDialogFooter for adding a footer to filter dialog * Allow filter chips update to trigger separate filter update type Add type to onFilterChange callback to allow differentiation among filter types, adding a "reset" type for filter reset * Minor enhancements * Add serverside filter example Uses all of the additional functionality to create a new filter experience for serverside use cases * Add tests for major functionality additions - filterList - customFilterDialogFooter - onFilterDialogOpen * Fire onFilterDialogOpen after setState for consistency with other callbacks * Add serverSideFilterList for chip display with serverside filters * Add tests for serverSideFilterList * Add onFilterDialogClose callback option * Add test for onFilterDialogClose * Add serverside filter example to new router setup
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Attempt to resolve #857 as well as any other requests around the difficulty of achieving server side filter functionality.
Handling filters on the server side is not an experience that has been optimized in this library. Some of the problems are:
filterList
in column options is connected to both the change in the fields in the filter dialog as well as the filter chip display, meaning that the display of applied filters cannot be stalled until a successful API call (they will be applied immediately regardless of any success/failure from an API call)Here are the solutions offered in this PR:
onFilterDialogOpen
andonFilterDialogClose
callbacks are added for opening and closing the filter dialog respectivelyserverSideFilterList
option has been added to track the display offilterList
as chips (array of filter arrays, as structured internally). WhenserverSide
is set totrue
, filter chips will no longer populate as before, and will requireserverSideFilterList
to populate.customFilterDialogFooter
option added to allow a custom component to be added to the bottom portion of the filter dialog for custom functionality, such as an "Apply Filters" buttonThe example
serverside-filters
was added to demonstrate the use of some of these features to create a serverside filtering experience.