Skip to content
Snippets Groups Projects
Unverified Commit b6bb9d18 authored by Romeo Van Snick's avatar Romeo Van Snick Committed by GitHub
Browse files

Allow creating new items by inserting comma in MultiAutocomplete (#42824)


* Pass current values to shouldCreate

* Allow comma to create new item

* Simplify getAvailableSelectItems

* Add unit test for MultiAutocomplete input

* Use text instead of Text in paste

* Handle spaces in MultiAutocomplete

* Remove cast

* Reuse last var

* Use haveLastBeenCalledWith over haveBeenCalledWith

* Handle pasting when there is text in the input already

* Accept quote-delimited values

* Add info icon

* Handle tab as a separator

* Fix test cases for unsanitized parseValues

* Add csv-parse

* Use csv-parse to parse values

* Apply the correct color to the info icon

* Rename util to utils

* Break up tooltip text

* Only return unique values

* Be more accepting around quotes in the middle of unescaped values

* provide Buffer for csv-parse package in storybook

* Use browser-friendly version of csv-parse

* Remove unused eslint rule

* Add specital case for csv-parse to jest config

* Put uniqueness check in each state update

* Only add partial value if it is valid

* Only add partial value if it is valid

* Fix test case for FilterValuePicker

* Just use Set

Co-authored-by: default avatarKamil Mielnik <kamil@kamilmielnik.com>

* Allow parsing more than one value

* Use isValid everywhere it makes sense

* Add test for RTL languages

---------

Co-authored-by: default avatarAleksandr Lesnenko <alxnddr@gmail.com>
Co-authored-by: default avatarKamil Mielnik <kamil@kamilmielnik.com>
parent e7948a72
No related branches found
No related tags found
No related merge requests found
Showing
with 477 additions and 47 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment