0
Ich versuche, eine Autovervollständigung für die Redux-Form mit Redux-Form-Material-UI zu erstellen. Jedoch bin ich mit diesem Problem fest, dass der onUpdateInput nicht feuert. hier ist ein Teil meines Code, um das AutocompleteOnUpdateInput wird nicht auf Redux-Formular Material ui gefeuert?
import { Field, reduxForm } from 'redux-form';
import { DatePicker, AutoComplete } from 'redux-form-material-ui';
class autocompleteComponent extends React.Component {
onChange = value => {
//this is firing properly
}
onSearch = value => {
//this is not firing at all
const { getPatients } = this.props;
if (value.length) {
getPatients(value);
}
}
render() {
const { patientData} = this.props;
return (
<Field
id="patient-no"
name="patientNo"
hintText="Patient No"
component={AutoComplete}
dataSource={patientData}
dataSourceConfig={{ text: 'patientNo', value: 'patientNo' }}
onNewRequest={value => this.onChange(value)}
onUpdateInput={value => this.onSearch(value)}
filter={(searchText, key) => true}
fullWidth={true} />
)
}
}
Zusammenhang Wenn jemand mir helfen konnte oder einige Hinweise zu diesem Thema hat, mich bitte nicht wissen lassen.
dank