appsmith
appsmith copied to clipboard
[Feature]-[800]:Server-side filtering for Tables
Is there an existing issue for this?
- [X] I have searched the existing issues
Summary
Binding of the data from the Filter fields to the data sources.
Why should this be worked on?
Currently, the filtering is client-side. Especially with large amounts of data, I use serverside pageination. But now it would be practical to integrate the data in sql as with serverside pagination. Table.filterJson next to Table.search and Table.pageNo would be really nice.
@lublak sort is already available. You can bind {{Table1.sortOrder.column}}. Server-side filtering is still missing today
@lublak this might be possible today even on the server side using the onSort event, which can be used to call an api, We also have an internal property {{Table1.sortOrder}} which gives you the column name and the order in which the user is asking you to sort, this is set to null when no column is set on sort.
@Nikhil-Nandagopal do you think this solves the problem? This is not well documented though. cc @Pranay105 @dilippitchika
@somangshu it does but the same needs to be possible for filters as well
@Nikhil-Nandagopal agreed, we have an open issue for that, not yet prioritised, we might be able to get it up once we have the v2 for table. Though in no way this is dependent on the v2 implementation.
@Tooluloope I remember you working on the earlier feature set, Any comments on this, What is the effort required? Did we push this back for a reason?
Yes for sorting there is it available (but are we missing the serverside switch like the serverside pagination to disable all client side searching?) Filtering is still completely missing.
Hey @lublak could you expand on the switch part? You have events called onSearchTextChanged and onSort.
If you bind a query to it, it will be triggered with the events making it server side, if you don't it will be done on the client side. Is this part of the table events unclear?
Agreed on the filtering part.
@dilippitchika
the Sort switch is also missing
Or "Enable client side sort"
Hey @lublak the reason we have "Server side Pagination" as a switch is because it needs extra properties for it to be configured and used.
For server side sort, we don't have a switch because once you configure the onSort action to bind to a query it is server side sort. You don't need an extra switch for it. When there is no query bound to onSort it uses client side sort.
The switch is only needed for server side if there are some extra properties which are needed to be filled.
@dilippitchika and what about "Enable client side search"? Why is this needed?
@lublak that is used to disable the client-side search when server-side search is applied way so that the client-side does not override the server-side search
@lublak Here's the issue to understand why we added the property https://github.com/appsmithorg/appsmith/issues/5444
Today, we already expose all the filter properties using Table1.filters, we need to add a new onFilterUpdate action to support this.
@Nikhil-Nandagopal @Tooluloope thanks for the answer :) i understood now. It's just a bit confusing when it's there for searching and not for sorting. I'm sorry I didn't understand it right away.
@dilippitchika in case there is enough clerity here with what needs to be implemented, Please move this to the backlog and unassign yourself
Action desired behavior for this feature
- Add .filters into the autocomplete for users to know it can be accessed.
- Add a new onFilterUpdate which detects the changes made in the filters and triggers this action.
@somangshu now that we have 2 versions of tables how to uptake this change?
Should this be moved to Table WIdget V2 or remain in Enhancement?
Will check and get back tomorrow, @Tooluloope
@Tooluloope we should do this in V1 as well, checked with @sbalaji1192. Please discuss with him before picking it up.
@dilippitchika considering the previous discussion, can you drop the summary here and add what is required to resolve the actionable, We will resolve this internally.
Action desired behavior for this feature
- Add .filters into the autocomplete for users to know it can be accessed.
- Add a new onFilterUpdate which detects the changes made in the filters and triggers this action.
[Updated requirements]
Action desired behavior for this feature
-
Add .filters into the autocomplete for users to know it can be accessed.
-
Use the "Enable client side search" switch to show/hide another event described below. Rename the switch to say "Enable client-side filtering", when turned on it should hide and not execute onSearchTextChanged and the below event.
-
Add a new onFilterUpdate which detects the changes made in the filters and triggers this action. This will only run when "Enable client-side filtering" is off.
@somangshu @Tooluloope please review and move this to product backlog if clear
@dilippitchika instead of a new property, can we just rename "Enable client side search" to "Enable client-side filtering" and use it for both search and filter because I don't see much of a use case to have search on and filter off.
Stats
| Stat | Values |
|---|---|
| Reach | 200 |
| Effort (months) | 0.5 |
Will be handled after #9135 release
This is a deal breaker for us, unfortunately. Any ideas when it might come around?
Hey @acron0, The dependency on this have been cleared, but we still havent prioritized this.
While I talk about this internally, can you explain your use case, Maybe we can suggest some workaround.
cc @dilippitchika
[Internal] PRD -https://www.notion.so/appsmith/Supporting-server-side-filtering-445d8f060bf14c5b98e62dcbcd835162
- TL;DR The design task was to accommodate for:
- Switching On Server-Side Filtering property
- Allowing a Column to be filterable or not.
- Filterable Property reflected in Filter Dialog.
- Filter Modes in Default Filters property.
- Setting the Filter Data Format returned by the Table.filters
- Allowing/Disallowing Column Filter Operators
- Filter modes reflected in Table Filters (Desktop and Mobile)
Hi, is there any progress about the issue? I would like to use it too. I have a lot of fields to filter and I really like this popup.