-
Notifications
You must be signed in to change notification settings - Fork 251
Cannot use with Material UI's Autocomplete #887
Comments
Right, you have to map |
Right @davidkpiano I did take a look at the docs, but I can't seem to understand them right. I've tried: mapProps={{
searchText: (props) => props.modelValue,
}} and mapProps={{
searchText: (props) => props.viewValue,
}} and mapProps={{
searchText: (props) => props.value,
}} And all these with I can't seem to understand this mapping.... |
Okay, the value mapping is correct, but maybe the issue is in how the value changes. Does Autocomplete have an |
Thanks @davidkpiano, indeed Autocomplete only seems to have a mapProps={{
searchText: (props) => props.modelValue,
onUpdateInput: (props) => props.onChange,
}} I still cannot update the model's value, nor trigger events on change. :$ |
Found the problem! I forgot to add |
The Problem
If I use Material UI's Autocomplete inside a Control's
component
prop, the viewValue doesn't map to the models value.Steps to Reproduce
If you write here, the car model will always be empty, whereas this works perfectly if I use the
TextField
from the same library. There seems to be no help over there.Expected Behavior
When I write or select a year inside the Control the model should populate it's year attr with that value
Actual Behavior
Model is not updated whatsoever, and no action is dispatched upon writing
EDIT:
This appears to be because AutoComplete doesn't seem to directly expose a
value
prop?I'm unsure what to do here.
The text was updated successfully, but these errors were encountered: