The s-money-field components accepts hyphen(‘-’).
When an hyphen is entered the ‘onInput’ callback provides blank value in ‘CallbackEvent.currentTarget.value’
Case:
Actual input: ‘89-01’
e.currentTarget.value:
The s-money-field components accepts hyphen(‘-’).
When an hyphen is entered the ‘onInput’ callback provides blank value in ‘CallbackEvent.currentTarget.value’
Case:
Actual input: ‘89-01’
e.currentTarget.value:
That’s because it find the value to be invalid.
I’m not sure what your use-case is for this format, but if you want to use it, you’ll need to use something besides s-money-field for it.
Let me know what your intended use-case is, and I’ll see if it something that we should support.
Hello @Anthony_Frehner
The problem is inconsistency in behaviour.
In the case I mentioned the input received is null but in the text component shows the actual invalid value to the user.
Examples
CASE 1 (This seems fine)
User Input: “89a” (invalid input)
e.currentTarget.value: ”” (blank or null)
UI Component shows: ““ (blank or null)
CASE 2 (The problem)
User Input: “89-01” (also invalid input)
e.currentTarget.value: ““ (blank or null)
UI Component shows: “89-01“ (NOT BLANK?)
This causes multiple issue like:
I think the two values:
**- e.currentTarget.value
But at the very least there should be consistent behaviour for all “invalid” inputs.