-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
hooks and documentation for use-selection
#7872
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
Conversation
…y data and add corresponding test cases"
|
For having implemented such a hook in my own project, I'd suggest the following should be added:
@rtivital is that going too far for what you had in mind? |
|
Yeah, makes sense, I'll check how this should be handled, probably as an option |
|
At the very least I think |
|
@jvdsande |
- Updated `isSomeSelected` to check if selected items exist in the current data. - Added tests to verify `isSomeSelected` returns correct values for various selection states.
e99205c to
1c4dd25
Compare
|
Hi @rtivital I noticed that PR #7873 had its target branch changed to the next version branch, while my PR #7872 (which implements similar useSelection functionality) is still targeting the current branch. I'm curious about the decision process - was there something specific about the implementation approach or timing that influenced which PR gets included in which version? I'd love to understand the criteria so I can better align my contributions with the project roadmap. Both PRs seem to tackle similar functionality, so I'm wondering if there are plans to:
I'm happy to collaborate or adjust my PR based on the project's needs. Thanks for all the great work on this project! Best regards |
|
On Discord you've mentioned that you want to implement it out of interest. The other person requested to develop this feature before you and submitted PR. Implementations are not very different, so, from my side, it seems to be more polite to accept the PR that was assigned to someone initially. Nothing wrong with the code. |
@rtivital |
Description
Changes
use-selectioncustom hook implementation in[@mantine/hooks].isSomeSelectedlogic to handle empty data cases correctly and added related test cases.use-selectionin[@mantine/hooks].[@mantine/docs], including:[@mantine/core]to use@mantine/hooksfor state management.[@mantine/dates]to use@mantine/hooksfor state management.