Closed robinsandborg closed 3 years ago
Agree that this is pressing. Also agree on not having n components. We should normalize. Also love the thought of having it being i18n sensitive. This would be 💯 .
I will start on a proposal.
@XSlemX could you at the same time take a look at the way defaultValue now works? As it is now, we are getting spammed with warnings as we have none-cleave inputs and Input now uses seRawValue from cleave. We need a way to set a defaultValue without getting all these warnings. It works fine as it is now, so maybe remove the warnings maybe?
@Thymas1 This would hopefully be covered by expanding the test coverage to include controlled components for all input components (including SelectSimple, Radios, etc)
Should we add first class support for react-hook-form? Seems like this is go-to for most X'ers.
Inputs are core in the functionality Bento provides. It is therefore important that there is as little friction and hurdles when working with inputs as possible.
After recently working on a very input-heavy project, I have some thoughts and pains I'd like to discuss. The best solution however is something we should work on together. Here are some of my thoughts:
<Input formatting={CURRENCY} />
or something to that effect?currency
should yield different results based on language without having to do someting like<Input formatting={locale = "no" ? CURRENCY.NO : locale = "fi" ? CURRENCY.FI : CURRENCY} />
<Controller />
implementation.Regarding my thoughts on the i18n-formatting, this needs to be customizable in case the client does not agree with what's "correct" or you need to use one locales rules on another locales language. Could we take some inspiration from our theming implementation for this?