refinedev/refine

[BUG] Datagrid replace filters with shortened on the query string

Closed this issue · 1 comments

Describe the bug

After refreshing the page, datagrid replaces pageSize=25&current=1&filters[0][field]=startNum&filters[0][operator]=gte&filters[0][value][0]=1&filters[1][field]=endNum&filters[1][operator]=lte&filters[1][value][0]=4url with
pageSize=25&current=1&filters[0][field]=startNum&filters[0][value][0]=1&filters[0][operator]=gte. I can't find any reason of it. Also datagrid filters is changed.

Steps To Reproduce

  1. Update datagrid filters using setFilters of useDataGrid
  2. See query string is changed like this
    pageSize=25&current=1&filters[0][field]=startNum&filters[0][operator]=gte&filters[0][value][0]=1&filters[1][field]=endNum&filters[1][operator]=lte&filters[1][value][0]=4
  3. Refresh the page
  4. Query-string is changed with this pageSize=25&current=1&filters[0][field]=startNum&filters[0][value][0]=1&filters[0][operator]=gte after datagrid is initialized.

Expected behavior

It should keep the filter's query-string and datagrid filters as it is,

Packages

  • "@refinedev/cli": "^2.16.21",
  • "@refinedev/core": "4.49.0",
  • "@refinedev/devtools": "1.1.36",
  • "@refinedev/inferencer": "4.6.0",
  • "@refinedev/kbar": "1.3.8",
  • "@refinedev/mui": "5.14.6",
  • "@refinedev/react-hook-form": "4.8.16",
  • "@refinedev/react-router-v6": "4.5.7",

Additional Context

No response

I found the issue

warning.js:8 MUI: The filterModelcan only contain a single item when thedisableMultipleColumnsFilteringprop is set totrue. If you are using the community version of the DataGrid, this prop is always true.