question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AutocompleteArrayInput createLabel prop is missing

See original GitHub issue

What you were expecting: The ReferenceArrayInput also seems to have the same bug https://github.com/marmelab/react-admin/issues/7822

createItemLabel is just displayed empty

<ReferenceArrayInput source="visitors" reference="eventVisitor">
    <AutocompleteArrayInput optionText="disp_name" create={<CreateGast />} createItemLabel="Erstellen" />
</ReferenceArrayInput>

SelectArrayInput works normal

<ReferenceArrayInput source="visitors" reference="eventVisitor">
    <SelectArrayInput optionText="disp_name" create={<CreateGast />} createItemLabel="Erstellen" />
</ReferenceArrayInput>
  • React-admin version: 4.2/4.3
  • Last version that did not exhibit the issue (if applicable): 3.x
  • React version: 18.x
  • Browser: Chome
  • Stack trace (in case of a JS error): none

Thx Michel

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sidescrapercommented, Oct 7, 2022

found a workaround for me. The optionText field doesn’t seem to like other then “name”.

Does not display the ra.action.create_item / optionText=“disp_name” image

        <ReferenceArrayInput source="visitors" reference="eventVisitor"
          perPage={1000} sort={{ field: 'disp_name', order: 'ASC' }}>
            <AutocompleteArrayInput
                optionText="disp_name"
                create={<CreateGast />}
            />
        </ReferenceArrayInput>

Shows the ra.action.create_item / optionText=“name” image

        <ReferenceArrayInput source="visitors" reference="eventVisitor"
          perPage={1000} sort={{ field: 'disp_name', order: 'ASC' }}>
            <AutocompleteArrayInput
                optionText="name"
                create={<CreateGast />}
            />
        </ReferenceArrayInput>
0reactions
WiXSLcommented, Sep 8, 2022

Ok, so I’m closing this issue, since this sis not a bug

Read more comments on GitHub >

github_iconTop Results From Across the Web

AutocompleteArrayInput inside ReferenceArrayInput #2477
AutocompleteArrayInput inside ReferenceArrayInput causes error with flowing ... In that case, set the `translateChoice` prop to false.
Read more >
Input Components - React-admin
Use the onCreate prop when you only require users to provide a simple string and a prompt is enough. You can return either...
Read more >
AutocompleteArrayInput displays blank entries
Am I missing a configuration setting? I want to avoid providing an exhaustive list of options to the component, if possible. Environment. React- ......
Read more >
react-admin - Projects - FOSSA
... 7822-autocompleteinput-does-not-respect-createlabel-prop; 7831-clear-all-filters ... add-internal-props; add-links-on-landing-page; add-missing-exports ...
Read more >
API - React Select
Even when commonProps are not listed in the prop types below, a custom component will still have access to them. StateManager Props. The...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found