You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What you were expecting:
When using the FormGroupContextProvider around an ArrayInput, the isDirty property of useFormGroup still is a boolean, as the type definitions indicate.
What happened instead:
When using the FormGroupContextProvider around an ArrayInput, the isDirty property of useFormGroup is broken: When changing the array input, the isDirty property is set to some array that containes information about properties of array elements that have changed. But it should be just a boolean.
Steps to reproduce:
Use an ArrayInput inside a FormGroupContextProvider
Inside that FormGroupContextProvider, also use a component that uses isDirty via useFormGroup in some way (e.g., by displaying it)
Adjust values managed by the ArrayInput, or add/delete items of the ArrayInput
Observe that the isDirty property is set to an array, instead of just a boolean.
What you were expecting:
When using the
FormGroupContextProvider
around anArrayInput
, theisDirty
property ofuseFormGroup
still is a boolean, as the type definitions indicate.What happened instead:
When using the
FormGroupContextProvider
around anArrayInput
, theisDirty
property ofuseFormGroup
is broken: When changing the array input, theisDirty
property is set to some array that containes information about properties of array elements that have changed. But it should be just aboolean
.Steps to reproduce:
ArrayInput
inside aFormGroupContextProvider
FormGroupContextProvider
, also use a component that usesisDirty
viauseFormGroup
in some way (e.g., by displaying it)ArrayInput
, or add/delete items of theArrayInput
isDirty
property is set to an array, instead of just aboolean
.Related code:
https://codesandbox.io/s/goofy-tess-wzpom6?file=/src/posts/PostEdit.tsx:5416-5440
In the
PostsEdit.tsx
in the miscellaneous tab, I added aFormGroupContextProvider
around thebacklinks
ArrayInput
, which shows the problem.Other information:
![output](https://user-images.githubusercontent.com/236845/202222749-afa2218a-d8d6-406a-8cb4-f61186eec254.gif)
The text was updated successfully, but these errors were encountered: