Open eliranamar opened 6 years ago
@eliranamar Could you take a look at example code , we have example with AutoComplete component .
http://erikras.github.io/redux-form-material-ui/ Make sure you're using right MUI and redux-form-material-ui version.
Auto complete has been deprecated with MUI 1.0.
Feel free to re-open if issue still persist.
i did it like the example, when the dataSource is an array of strings, it works ok, but when its an array of objects, it doesnt show options,
when i use the the MUI autocomplete with array of objects with config, it works, but within redux-form Field component, it doesnt. can you please re open the issue?
<MUIAutoComplete
filter={MUIAutoComplete.fuzzyFilter}
dataSource={dataSource}
dataSourceConfig={dataSourceConfig}
/>
@eliranamar Sure. Could you see are these props are getting passed over till Auto Complete ?
yes, weirldy the dataSourceConfig is the default one, and not the one i pass,
you can see the dataSourceConfig prop here : https://imgur.com/w4WFVGH
my dataSourceConfig is not passed for some reason, my code:
return (
<div>
<Field
component={AutoComplete}
name={name}
hintText={hintText}
fullWidth
label={label}
filter={MUIAutoComplete.fuzzyFilter}
dataSource={dataSource}
validate={validator}
dataSourceConfig={{ text: 'label', value: 'value' }}
/>
</div>
);
}
my packages are :
"redux-form": "6.6.3",
"redux-form-material-ui": "4.1.3",
my goal is to show the labels of my data for selection, but keep the value in redux-form. So i have this dataSource for example:
which i send as prop to my AutoComplete component,
like this:
when i start typing something, like 'uni', no options are shows for selection. like the docs show, http://www.material-ui.com/#/components/auto-complete i pass a dataSourceConfig. i have tried both material-ui/AutoComplete' and 'redux-form-material-ui' fuzzyFilter,
here is my code: