S-money-field sends incorrect value in 'onInput' callback

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:

  • not sure how/when to show feedback like an error message.
  • not sure how to handle the data.

I think the two values:
**- e.currentTarget.value

  • what the UI Component shows**
    should be exactly the same. valid or invalid.

But at the very least there should be consistent behaviour for all “invalid” inputs.