Closed Slavenin closed 6 years ago
if you remove all the <FormControl>...</FormControl>
code do you get the errors? if you stop getting the errors, try using the <TextField [select] /> instead.
Yes, error exists. I am do like this:
const Orgs = () => (
<FormControl className={classes.purchaseFormItem}>
<InputLabel>Организация</InputLabel>
<Select
required
multiple
value={subm.selOrg}
style={{ display: 'flex' }}
inputProps={{
name: 'organization[]',
id: 'organizationid',
}}
onChange={this.handleChange('selOrg')}
name='organization[]'
disabled={fullDisable}
>
{orgList.map((o) => <MenuItem key={o.id} value={o.id}>{o.title}</MenuItem>)}
</Select>
</FormControl>
);
but in this case library can not find select in this function and i create custom handler for this with save value in state. It dark way, but it work...
it looks like some element with name
and value
props is causing the helperText
and error
warnings. please try to take out these elements one by one to see which is causing the warnings.
If i remove all checkbox and selects - form work correctly, but if add at least one checbox i see error about "error" attribute, if select - about "helperText"
can you try using the FormControlLabel
for the checkboxes?
import FormControlLabel from '@material-ui/core/FormControlLabel'
<FormControlLabel
control={<Checkbox checked={organization.isActive} name="isActive" value="" />}
label="Состояние компании"
/>
for the select, did you try using <TextField select />
?
This work. But why i can not use Select
and Checkbox
components?
Hi! In this from i have two errors:
and
and i can not understand what this errors??? Please help me! It's very urgent