Comments (5)
That's interesting... I guess I was confused by the fact it was almost working out of the box with ReferenceArrayInput
too. They almost provide the same context...
Anyway it works fine with ReferenceInput
, thanks !
from react-admin.
Thank you for this report and for the investigation work.
Can you please provide a reproduction sandbox (forked from https://codesandbox.io/s/github/marmelab/react-admin/tree/master/examples/simple or https://stackblitz.com/github/marmelab/react-admin/tree/master/examples/simple ) so that we can investigate the issue ?
Also, can you please confirm you are using an AutocompleteArrayInput
as child of ReferenceArrayInput
and not a simple AutocompleteInput
?
I'm wondering because of this sentence in your report:
Specifically, AutocompleteInput returns a string value (unlike AutoCompleteArrayInput), while useReferenceArrayInput expects an array.
from react-admin.
Thanks @slax57. No I am using AutocompleteInput
for a single entry, not the Array variant. It's used in a filters component. It works fine except when the choices are not present in the list.
I will try to make a simple repro sandobx
from react-admin.
Here is the sandbox
https://codesandbox.io/p/devbox/funny-firefly-p64lgt?file=%2Fsrc%2FdataProvider.tsx%3A42%2C43
I cannot repro 100% (could be a cache problem) but it is still possible to demonstrate the issue. In our cases, the input is empty even before reloading.
1/ Working example: Add Tags filter. Click the input wait for the list to populate, select "Sport" . Only Sport posts are shown. Reload the page (the whole sandbox), the Sport filter is still working
2/ Broken example: Add Tags filter, Click the input, type "mu", wait for the list to populate, select "Music". Only Music posts are shown. Reload the page (the whole sandbox). The Music filter is still working but the Tags input is empty
Actual:
Expected:
from react-admin.
Thanks for the sandbox.
If you are using ReferenceArrayInput
the child should be an AutocompleteArrayInput
. If you are expecting a single entry, you should be using a ReferenceInput
with an AutocompleteInput
child.
Am I missing something?
from react-admin.
Related Issues (20)
- Change title property type in core display components <Edit>, <Show>, <View> HOT 1
- Standalone version of the Store for a dual-store strategy HOT 3
- Unable to clear default value in DateTimeInput component HOT 3
- Documented theme level defaultProps overrides do not work for react admin components HOT 4
- Reference Array selected item from a filter query vanishes immediately after selection. HOT 2
- Infinite re-rendering using disabled AutocompleteArrayInput in a ReferenceArrayInput HOT 6
- AutocompleteInput don't keep focus with mouse HOT 5
- Documentation update in sample. HOT 3
- NumberInput's `onBlur` prop does not provide an event object HOT 2
- Add ability to customize query string format for lists HOT 5
- i want to show the received gmail in react js app
- AutoComplete choice listing issue when using useChoicesContext HOT 1
- react admin error with Menu.Item missing properties HOT 6
- storeKey prop is not passed to useRecordSelection hook inside useListController HOT 5
- useEditContext returns null for both values HOT 5
- Infinite loop occurs in page rendering when perPage is set to a negative number in List Component HOT 2
- Codemods are not included in ra-core v5
- Duplicate entries in documentation search HOT 2
- `<PasswordInput/>` or `<TextInput/>` has corrupted `validate` prop, if field is handled with `disabled` prop HOT 4
- Auth provider login Promise rejection with "message" doesn't trigger notification message HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-admin.