Linking Two Inputs: format
function change does not trigger a rerender
#8405
Labels
format
function change does not trigger a rerender
#8405
I have two inputs in a form: one for the value and another for the unit
What you were expecting:
I expect changing the unit from selection input will cause the value also be reformatted based on the new unit
What happened instead:
The value does not get reformatted
Steps to reproduce:
Go to https://stackblitz.com/edit/github-m7rhmv?file=src%2Fcomments%2FCommentCreate.tsx
Go to Comments -> Create new comments
In the form change the units to degrees or radians, however in the value input only input adornment gets changed, but not the input value.
Related code:
The value may need to be recalculated here
react-admin/packages/ra-core/src/form/useInput.ts
Line 94 in 032e146
Maybe missing a dependency in useEffect
react-admin/packages/ra-ui-materialui/src/input/NumberInput.tsx
Line 69 in 032e146
Other information:
Environment
The text was updated successfully, but these errors were encountered: