В admin-on-rest
, как мы можем использовать обработчик onChange для изменения значения TextInput во время ввода (т.е. перед проверкой)?
См. пример:
const handleChange = (e, newValue) => {
const value = newValue.toUpperCase();
// ???? How do we inform the TextInput of the new value, since we do not have a state inside this component but only in REDUX?
};
...
<Edit title={<TitleEdit />} {...props}>
<SimpleForm validate={validateCreateEdit}>
<TextInput label="BRAND" source="brand" onChange={handleChange.bind(this)} />
</SimpleForm>
</Edit>
Спасибо.