Closed brandongregoryscott closed 2 years ago
what is the expected behavior for this case? just simply don't throw an error when the user clicks ESC
or?
I believe I already found the workaround for this. Can you please assign this task to me?
@pandurijal I think the esc should basically be swallowed, the same behavior as our standard TextInput
or Textarea
components
sure @brandongregoryscott I already opened a PR for this issue
Steps to reproduce:
TagInput
component, such as the ones on the doc site https://evergreen.segment.com/components/tag-inputesc
key, and you should get the following runtime error:TypeError: Cannot read properties of null (reading 'split')
At a first glance, it seems like pressing
esc
is setting the internalinputValue
(which is expected to be astring
) tonull
, which breaks the string-splitting behavior for generating the tag list.