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
Is your feature request related to a problem? Please describe.
The ReferenceArrayField component has a filter prop which allows to filter results client-side. However if the filtered value is an array, the filter does not work because the component does a simple == comparison.
For example if I have a resource with a property foo: ['bar', 'baz'], then using the filter prop { foo: 'bar' } will not return this property because 'bar' != ['bar', 'baz'].
Describe the solution you'd like
Change this line in the useReferenceArrayFieldController to something like this:
Is your feature request related to a problem? Please describe.
The
ReferenceArrayField
component has afilter
prop which allows to filter results client-side. However if the filtered value is an array, the filter does not work because the component does a simple==
comparison.For example if I have a resource with a property
foo: ['bar', 'baz']
, then using the filter prop{ foo: 'bar' }
will not return this property because'bar' != ['bar', 'baz']
.Describe the solution you'd like
Change this line in the
useReferenceArrayFieldController
to something like this:Describe alternatives you've considered
Create our own component, but I think this is a feature others may want.
Additional context
I can do a PR if you think this is a good idea.
The text was updated successfully, but these errors were encountered: