-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fix TagsInput duplicate deletion behavior #6907
Fix TagsInput duplicate deletion behavior #6907
Conversation
Thanks! |
@@ -336,7 +336,7 @@ export const TagsInput = factory<TagsInputFactory>((_props, ref) => { | |||
key={`${item}-${index}`} | |||
withRemoveButton={!readOnly} | |||
onRemove={() => { | |||
setValue(_value.filter((i) => item !== i)); | |||
setValue(_value.splice(index, 1)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this correct? I'm seeing that clicking X to remove a tag now removes all other tags except the target
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think I should've used .toSpliced
here @adelamarAtGalileo can you let me know if this resolves it?
Seems alright to me, but clearly I missed it yesterday. Storybook must not have refreshed 🤷.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
skill issue (on my behalf). I've opened a PR. Thanks for catching :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, hopefully released soon, already got complaints from users :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@max-degterev You can downgrade to "@mantine/core": "^7.11.1"
so you can avoid the newly introduced bug while waiting for a new release with the fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe @rtivital pushes this out soon, I keep my hopes up :)
fixes #6873