ui-kit: Localized Inputs Break When Value Is Null
Summary
LocalizedTextInput, LocalizedMultilineTextInput, LocalizedMoneyInput and LocalizedRichTextInput all crash when supplied with an undefined or null value prop.
I am not sure what the expected result would be, since we derive the languages from the value prop. So if value is undefined, we can’t render any inputs as we don’t know which language labels to use?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 18 (18 by maintainers)
We do provide it as a static function 😉.
So should I close this then?
Another option we have would be to do something like this (example from
LocalizedTextInput)Then it would not crash when we pass in invalid options. Might have performance implications though?
Yeah I guess 🤔 .
Our DateInputs also break if you enter invalid values.
I’m not sure I would really prioritize doing anything about this. The consumer can deal with it for now…