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
when passing optionText as a function, the string is always saved under name, which makes it impossible to use a combination of fields as the option text.
Environment
React-admin version: 4.2.0
Last version that did not exhibit the issue (if applicable):
React version: 17
Browser: Google Chrome 102.0.5005.115
Stack trace (in case of a JS error):
The text was updated successfully, but these errors were encountered:
What you were expecting:
When passing the
create
property toAutocompleteInput
, the default text for the creation option should bera.action.create_item
.What happened instead:
The text was
undefined
.Steps to reproduce:
optionText
prop is a function.Related code:
Code sandbox: https://codesandbox.io/s/fervent-breeze-muqxj4?file=/src/posts/TagReferenceInput.tsx
The change was made on lines 48:
Other information:
This is probably caused by line 84 of
react-admin/packages/ra-ui-materialui/src/input/useSupportCreateSuggestion.tsx
Lines 69 to 77 in 58f9841
when passing optionText as a function, the string is always saved under
name
, which makes it impossible to use a combination of fields as the option text.Environment
The text was updated successfully, but these errors were encountered: