-
-
Notifications
You must be signed in to change notification settings - Fork 45
Description
Right now it's very confusing when to pass an unmasked value or a masked value to the component. I'm thinking it would be better if users of the component were explicit about which value they cared to work with. An API I think might be good would be something like this:
<OneWayNumberMask @maskedValue=foo @update={{action (mut foo)}} />
In this scenario the developer passed the maskedValue
in and so the update
action would return the maskedValue
as the first argument and the unmaskedValue
as the 2nd argument.
<OneWayNumberMask @unmaskedValue=foo @update={{action (mut foo)}} />
In this scenario the developer passed the unmaskedValue
in and so the update
action would return the unmaskedValue
as the first argument and the maskedValue
as the 2nd argument.
It would be an error to pass both the unmaskedValue
and maskedValue
to the component.
We would deprecate passing value
in as a positional param to help move developers to being explicit about which type of format they want to use.