SelectArrayInput throws q.map is not a function
What you were expecting:
SelectArrayInput to render correctly The Filter is attached to a List embedded in a Tab on a resource Show page
What happened instead:
Error boundary caught q.map is not a function
Steps to reproduce:
Place a SelectArrayInput on a list filter embedded in a show tab
Related code:
<List
filter={{
parentId: record.id,
}}
filterDefaultValues={{
category: ["PERSON"],
}}
filters={[ <SelectInput
key="category"
source="category"
choices={[]}
alwaysOn
/>,]}
disableSyncWithLocation
>
Other information:
Environment
- React-admin version: 4.0.2
- Last version that did not exhibit the issue (if applicable): ~3
- React version: 18
- Browser: Chrome
- Stack trace (in case of a JS error):
Thanks for reporting this. Please provide a sample application showing the issue by forking the following CodeSandbox (https://codesandbox.io/s/github/marmelab/react-admin/tree/master/examples/simple).
@djhi I am having issue replicating the issue in codesandbox but this illustrates what I am attempting to do: https://codesandbox.io/s/elated-turing-m7060m?file=/src/posts/PostShow.tsx
I am now setting the filterDefaultValues on the list which seems to stabilize the issue
I can't reproduce the issue on your codesandbox even after removing the filterDefaultValues. Did I miss something?
No, the issue is intermittent and I am still trying to isolate it somehow
Could it be that I am running react 18?
That's possible. Maybe related to the development only "features" of React
No news for some time, closing