You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some reason, when the children change for the carousel, the component does not update. I've included a sandbox that adds an item to the carousel 4s after mounting. You can see the second image in the DOM, yet the carousel doesn't update.
What version of @mantine/hooks page do you have in package.json?
^5.1.1
If possible, please include a link to a codesandbox with the reproduced problem
Are you willing to participate in fixing this issue and create a pull request with the fix
No
Possible fix
Just a guess, there's likely some optimization to stop extraneous rerenders in the misbehaving component. Possibly forcing the component to rerender will work around the issue.
The text was updated successfully, but these errors were encountered:
Can be worked around by setting a key on the Carousel with the key value being the count of the items, so if an item is added, it will remount the Carousel. It isn't ideal, but it works for my purposes.
Thanks for the awesome work, btw. I've been blown away by the polish of these components. @rtivital, do you have a patreon or part of a sponsor program to buy you a coffee/tea or something?
What package has an issue
@mantine/carousel
Describe the bug
For some reason, when the children change for the carousel, the component does not update. I've included a sandbox that adds an item to the carousel 4s after mounting. You can see the second image in the DOM, yet the carousel doesn't update.
What version of @mantine/hooks page do you have in package.json?
^5.1.1
If possible, please include a link to a codesandbox with the reproduced problem
https://codesandbox.io/s/trusting-ardinghelli-w05eif
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
Just a guess, there's likely some optimization to stop extraneous rerenders in the misbehaving component. Possibly forcing the component to rerender will work around the issue.
The text was updated successfully, but these errors were encountered: