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
Autocomplete data grouping does not work perfectly when data is updated #2278
Comments
Please, include a codesandbox representing the issue. |
https://codesandbox.io/s/silly-banach-8yotvi?file=/src/App.js The initial state has Item1 grouped under A. After "Add Item to Group A" button is pressed, Autocomplete shows the new item under a different group A. |
@achmurali can you have a look at this? |
I found where the issue is. I'll post a PR with a fix in a couple of hours. |
#2297 is a partial solution that fixes the problem specifically in
So currently, every component that uses The grouping logic should be moved inside One issue about moving the grouping logic inside the I already started investigating into it but I would like to discuss it first, as it is not a trivial issue and don't want it to turn into a fruitless effort. |
What package has an issue
@mantine/core
Describe the bug
I posted a screenshot showing the issue. Item2 has group Item3. But when I add two new items also with group Item3, they are group by themselves.
The actually data has no difference between the groups. This issue only resolves itself when I refresh the app completely. All three items will be with the same group.
The issue only happens when I update the data behind Autocomplete.
What version of @mantine/hooks page do you have in package.json?
5.2.3
If possible, please include a link to a codesandbox with the reproduced problem
No response
Do you know how to fix the issue
No
Are you willing to participate in fixing this issue and create a pull request with the fix
No
Possible fix
No response
The text was updated successfully, but these errors were encountered: