File tree Expand file tree Collapse file tree
packages/ra-ui-materialui/src/input Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ import {
3333 useTranslate ,
3434 warning ,
3535 useGetRecordRepresentation ,
36+ useEvent ,
3637} from 'ra-core' ;
3738import {
3839 SupportCreateSuggestionOptions ,
@@ -151,13 +152,13 @@ export const AutocompleteInput = <
151152 matchSuggestion,
152153 margin,
153154 fieldState : fieldStateOverride ,
154- filterToQuery = DefaultFilterToQuery ,
155+ filterToQuery : filterToQueryProp = DefaultFilterToQuery ,
155156 formState : formStateOverride ,
156157 multiple = false ,
157158 noOptionsText,
158159 onBlur,
159160 onChange,
160- onCreate,
161+ onCreate : onCreateProp ,
161162 openText = 'ra.action.open' ,
162163 optionText,
163164 optionValue,
@@ -175,6 +176,9 @@ export const AutocompleteInput = <
175176 ...rest
176177 } = props ;
177178
179+ const filterToQuery = useEvent ( filterToQueryProp ) ;
180+ const onCreate = useEvent ( onCreateProp ) ;
181+
178182 const {
179183 allChoices,
180184 isLoading,
You can’t perform that action at this time.
0 commit comments