Open paulorsbrito opened 1 year ago
I managed to solve this by passing down an already formatted value, usind getValueProps
. I don't think that's the ideal solution but... it is what it is.
Same problem here...
I managed to solve this by passing down an already formatted value, usind
getValueProps
. I don't think that's the ideal solution but... it is what it is.
For me the solution was that as well, I did something like this using a ref to the <Form>
:
formRef.current?.resetFields();
formRef.current?.setFieldValue('maskValueNameInForm', maskFunction(myValueWithoutMask))
And my form look like this:
<Form
ref={ref}
...
>
<Form.Item
label='Value with mask'
name='maskValueNameInForm'
>
<MaskedInput
mask='your-mask'
/>
</Form.Item>
</Form>
I'm submitting a ... [X] bug report
Summary All the MaskedInput fields in a edit resource show it's values initially masked and then, less than a second later, turns into unmasked values. If I focus the field, it shows masked again and stays. This happens only after the second time I edit the record.
Other information
The code is as simple as this:
I'm using @pankod/refine@2.7.8, @refinedev/antd@5.1.0, @refinedev/core@4.1.0, antd-mask-input@2.0.7, antd@5.3.0