Skip to content
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

[XGrid] onFilterModelChange is not called when changing the link operator #1701

Closed
2 tasks done
wjdwndud0114 opened this issue May 19, 2021 · 2 comments · Fixed by #1706
Closed
2 tasks done

[XGrid] onFilterModelChange is not called when changing the link operator #1701

wjdwndud0114 opened this issue May 19, 2021 · 2 comments · Fixed by #1706
Assignees
Labels
bug 🐛 Something doesn't work

Comments

@wjdwndud0114
Copy link

wjdwndud0114 commented May 19, 2021

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

The onFilterModelChange callback is not called when you change the link operator on the filter.
This is a bug because when you have the filterMode="server" attribute, you rely on the callback to trigger updated requests to the server.

Expected Behavior 🤔

The onFilterModelChange callback should be called with the updated filter model if you change the link operator on the filter.

Steps to Reproduce 🕹

https://codesandbox.io/s/material-demo-forked-2nrlb

Steps:

  1. Change the filter by adding another multi filter. This should change the "last filter change" ISO string shown below the table.
  2. Change the link operator on the filter. This will not change the ISO string shown below the table.

Context 🔦

Using the filterMode="server" onFilterModelChange={onFilterChange} attributes, data is fetched with the new filter model in onFilterChange. Changing the link operator results in an invalid state of data where the presented data does not match what is shown in the filter model.

Your Environment 🌎

`npx @material-ui/envinfo`
  System:
    OS: macOS 11.0.1
  Binaries:
    Node: 16.1.0 - ~/.n/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.11.2 - ~/.n/bin/npm
  Browsers:
    Chrome: 90.0.4430.212 *** Used Chrome ***
    Edge: Not Found
    Firefox: Not Found
    Safari: 14.0.1
  npmPackages:
    @emotion/react: ^11.4.0 => 11.4.0
    @material-ui/core: ^4.11.0 => 4.11.2
    @material-ui/icons: ^4.5.1 => 4.11.2
    @material-ui/lab: ^4.0.0-alpha.57 => 4.0.0-alpha.57
    @material-ui/pickers: ^3.2.7 => 3.2.10
    @material-ui/styles:  4.11.2
    @material-ui/system:  4.11.2
    @material-ui/types:  5.1.0
    @material-ui/utils: ^4.10.2 => 4.11.2
    @material-ui/x-grid: ^4.0.0-alpha.27 => 4.0.0-alpha.28
    @material-ui/x-license:  4.0.0-alpha.28
    @types/react:  17.0.6
    react: 16.14.0 => 16.14.0
    react-dom: ~16.9.0 => 16.9.0
    typescript:  3.9.7

Order id 💳

[Order #25281] (May 25, 2021)

@wjdwndud0114 wjdwndud0114 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label May 19, 2021
@wjdwndud0114 wjdwndud0114 changed the title onFilterModelChange is not called when changing the link operator [XGrid] onFilterModelChange is not called when changing the link operator May 19, 2021
@dtassone dtassone added bug 🐛 Something doesn't work components: XGrid and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels May 19, 2021
@dtassone dtassone self-assigned this May 19, 2021
@wjdwndud0114
Copy link
Author

Hi @dtassone thank you for taking this issue. Can we escalate this issue as well as #1145 ? Purchased the pro plan and updated the issue description with the order ID.

@oliviertassinari
Copy link
Member

@wjdwndud0114 #1706 will fix this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants