maskedValue not applied to initialValue
See original GitHub issueDescription:
maskedValue
is not being applied to a field’s initialValue
. It only works when editing the field from its initial state
import { Form, Text } from 'informed';
const format = value => (value != null ? `$${value}` : value)
const parse = value => (value != null ? value.replace('$', '') : value)
return (
<Form>
<Text field="name" format={format} initialValue="test" parse={parse} />
</Form>
Observed behaviour:
The mask is not applied to the initial form value, which shows as test
. Typing in the field after the initial load correctly applies the mask.
Expected behaviour:
The initial form value should have mask applied and show as $test
.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
jquery mask masked doesnt work. How set initial value to mask
masked() - Gets a masked value programmatically. You can set the value by $('#id').val(initialValue).mask(maskPattern, options);.
Read more >masked input with initial value on ngOnInit not working on ivy
I updated to Angular 9 and ngx-mask 9. There's an issue with masked inputs, when value is set OnInit it's not displaying the...
Read more >Input Mask Guide | imaskjs
For untyped masks typedValue and unmaskedValue works identically. Mask also can be used without UI, e.g.
Read more >jquery.inputmask - UNPKG
The mask is defined and will not change during the input. ... this option to true the plugin also expects the initial value...
Read more >cpr-mask - npm
There are no other projects in the npm registry using cpr-mask. ... the non-masked value to see if the invalidClass should be applied...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Working on it!
Did you forget to release 2.7.8 with the fix for this @joepuzzo ? i see the version number was bumped but there is no new release tag on github or release on npmjs