refinedev / refine

A React Framework for building internal tools, admin panels, dashboards & B2B apps with unmatched flexibility.
https://refine.dev
MIT License
28.11k stars 2.18k forks source link

[FEAT] Local filtering (and sorting?) #4180

Closed snird closed 1 year ago

snird commented 1 year ago

Is your feature request related to a problem? Please describe.

There are "lists" that are not too long. For example, 20-30 items.

In this size, it makes more sense to serve them all at once to the client and operate on them locally.

This is already possible with the paginations side:

    pagination: {
      mode: "client",
    },

but filtering still sends a request to the server every time.

Describe alternatives you've considered

No response

Additional context

No response

Describe the thing to improve

If we can have a global "client" mode, not just for pagination. So that filtering and sorting will get done on the local data set.

EDIT: The reason I want this implemented on refine, rather than simply filter the array myself is integration with everythings else. Most importantly, the url changing to reflect the filter

BatuhanW commented 1 year ago

Hello @snird, after some discussion, we decided to add "off" mode to filter and sort. Stay tuned 🍻

omeraplak commented 1 year ago

Hey @snird , We've released local filtering and sorting support on @refinedev/mui@4.12.0! Can you try it out and give us feedback?