Skip to content
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

MultiSelect onAdd prop does not fire #3893

Closed
Sktank opened this issue Dec 16, 2019 · 3 comments
Closed

MultiSelect onAdd prop does not fire #3893

Sktank opened this issue Dec 16, 2019 · 3 comments

Comments

@Sktank
Copy link

Sktank commented Dec 16, 2019

As per the documentation

  1. onAdd is a callback invoked when new tags are added by the user pressing enter on the input.
  2. Pasting "hello\nworld" will invoke onAdd with ["hello", "world"]

Recently I've noticed the onAdd command is not firing, breaking the above two situations.

@adidahiya
Copy link
Contributor

@Sktank there's no top-level onAdd prop for MultiSelect. Do you mean tagInputProps={ onAdd }? When did this last work for you? Did you recently upgrade your version of the select package? It looks like this PR changed the behavior and could have caused onAdd to no longer fire as you expect: #3428

@adidahiya
Copy link
Contributor

I'm not sure that tagInputProps.onAdd is the best for your use case... can you explain a bit more what you're trying to do? Maybe it makes more sense to add an onCreateItem callback which gets a list of items when they get created.

@adidahiya adidahiya removed the P1 label Jan 14, 2020
@adidahiya
Copy link
Contributor

Resolved offline, the features added by #3429 (pasting values) and #3381 (allow creating new items in select components) should cover @Sktank's use case.

Do you think the docs need to be more clear about these features?

@adidahiya adidahiya removed their assignment Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants