worthy-azureW
Refine11mo ago
4 replies
worthy-azure

useAutocomplete onSearch: undefined is not being applied

I am using the useAutocomplete hook to populate a MUI Autocomplete field.
I want to disable server-side filtering, having only a couple of options.
From documentation, i should pass an undefined onSearch to the hook (like the example below), but even with this, when I type in the autocomplete a request is still made to the server.
How do i completely make the autocomplete client-side instead ok letting it make requests?

const { autocompleteProps } = useAutocomplete({
    resource: "testResource",
    pagination: {
        mode: "off",
    },
    onSearch: undefined,
});
Was this page helpful?