-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
FixedCompleted issues that will be published with next patch (1.0.X)Completed issues that will be published with next patch (1.0.X)
Description
Dependencies check up
- I have verified that I use latest version of all @mantine/* packages
What version of @mantine/* packages do you have in package.json?
8.1.0
What package has an issue?
@mantine/hooks
What framework do you use?
Vite
In which browsers you can reproduce the issue?
All
Describe the bug
Set
have various methods and mantine is hooked well for .add
method, but if I use .union
it does not update state.
Short example:
import { useSet } from "@mantine/hooks"
// ...
const mySet = useSet([1, 2, 3])
// ...
useEffect(() => {
const otherSet = new Set([3, 4, 5])
// don't work example:
mySet.union(otherSet)
// work:
otherSet.forEach((item) => mySet.add(item))
}, [])
useEffect(console.log, [mySet])
If possible, include a link to a codesandbox with a minimal reproduction
No response
Possible fix
Probably need to hook similarly as to .add
method.
Self-service
- I would be willing to implement a fix for this issue
Metadata
Metadata
Assignees
Labels
FixedCompleted issues that will be published with next patch (1.0.X)Completed issues that will be published with next patch (1.0.X)