Closed ZachSelindh closed 2 years ago
I don't understand your issue. Could you be more schematic about how to reproduce the issue, and what is the intended behavior? Thanks.
@WiXSL Absolutely. Essentially, a ReferenceInput/AutocompleteInput used to require to user to select one of the matching choices in the dropdown list. Now, the entered text persists whether a choice has been made or not, which is confusing and will lead to users believing they have made a choice when they have not.
It seems like a bug. I'm marking it as such.
Let me see what I can find since by default, the AutocompleteInput
has the MUI's clearOnBlur
prop set to true, but it doesn't seem to be working
What you were expecting: Consistent behavior from AutocompleteInputs as children of ReferenceInputs.
What happened instead: The AutocompleteInput will save incomplete text inputs without having made a dropdown selection.
The ReferenceInput does not seem to be making the appropriate calls when given the prop "enableGetChoices"
Steps to reproduce: Add an AutocompleteInput with common props such as filterToQuery and shouldRenderSuggestions as a child of a ReferenceInput with common props such as enableGetChoices.
Related code: https://codesandbox.io/s/ecstatic-ptolemy-64jbky?file=/src/posts/PostCreate.tsx
Environment