Skip to content

Commit 09695ba

Browse files
committed
Update MUI select
1 parent e09b703 commit 09695ba

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

packages/mui-component-mapper/src/form-fields/select-field.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ import Paper from '@material-ui/core/Paper';
1010
import Chip from '@material-ui/core/Chip';
1111
import MenuItem from '@material-ui/core/MenuItem';
1212
import CancelIcon from '@material-ui/icons/Cancel';
13+
import Grid from '@material-ui/core/Grid';
14+
import FormGroup from '@material-ui/core/FormGroup';
15+
import FormControl from '@material-ui/core/FormControl';
16+
import FormHelperText from '@material-ui/core/FormHelperText';
1317

1418
const useStyles = makeStyles(theme => ({
1519
root: {
@@ -318,8 +322,9 @@ function IntegrationReactSelect (props) {
318322
},
319323
}),
320324
};
325+
321326
return (
322-
<div className={ classes.root }>
327+
<React.Fragment>
323328
<NoSsr>
324329
<Select
325330
classes={ classes }
@@ -330,7 +335,10 @@ function IntegrationReactSelect (props) {
330335
isDisabled={ !!rest.isDisabled }
331336
/>
332337
</NoSsr>
333-
</div>
338+
<FormControl required={ rest.isRequired } error={ !!invalid } component="fieldset" >
339+
{ (invalid || rest.helperText || rest.description) && <FormHelperText>{ invalid || rest.helperText || rest.description }</FormHelperText> }
340+
</FormControl>
341+
</React.Fragment>
334342
);
335343
}
336344

0 commit comments

Comments
 (0)