How to show the initial value on CurrencyInput?
Closed this issue · 2 comments
gandarain commented
Hi, thanks for this library.
I want to ask You about showing the initial value on CurrencyInput.
Let say, I have one CurrencyInput and the initial value is 0, so the Input should be Rp 0.
Is it possible to do that?
CaioQuirinoMedeiros commented
Hi @gandarain
You just need to make sure the initial value
is 0. If you are using React Hooks it will be something like that:
const [value, setValue] = React.useState(0) // 0 as initial value
<CurrencyInput
value={value}
onChangeValue={setValue}
unit="Rp"
/>
gandarain commented
Yeah, I think it was my mistake, thanks for your explanation.