I'd like to disable react-number-format input, but this component doesn't have disabled property.
How can I disable it?
How can I disable react-number-format input
2.5k views Asked by Cory R At
2
There are 2 answers
0
On
For anyone wondering you can also show the number just as text. You can use the displayType prop.
<NumberFormat
value={69}
thousandSeparator={true}
prefix="$"
displayType="text"
/>
disabledis working fine.I have placed 2 components, one without the
disabledattribute and the other one with thedisabledattribute and the result is the desired one.Check this sandbox