New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] - I'm having an issue with changing value dynamically #45
Comments
Looks like NumericInput do not rerender when I have a similar issue const [gratuityAmount, setGratuityAmount] = useState<number>(0);
function onNumericInputChange(value: number): void {
const valueInCurrency: number = Number(value.toFixed(2));
setGratuityAmount(valueInCurrency);
}
<NumericInput
value={gratuityAmount}
minValue={0}
maxValue={10000}
step={0.25}
onChange={onNumericInputChange}
...
/> If the user inputs |
I am having the same issue. When
|
did you test it and it worked? btw, sorry for taking so long to respond I was busy with school |
That's okay @himelbrand . Yes I tested it and it worked. Updating the state when |
this doesn't work if you set a initValue, and then decrease it will reset the number to 1, this only fixes if you increase with initValue. |
If you want to reset the number [the
|
This workaround worked for me. Thks |
It's right, you can try this
|
Here is the complete componentDidUpdate that is working for me. I added the
|
I want to dynamically change the value to a default value I made when I click on a button.
My code looks like this:
The text was updated successfully, but these errors were encountered: