Skip to content

Commit

Permalink
Revert "[Select][material-ui] Add name to hidden input element" (#40174)
Browse files Browse the repository at this point in the history
  • Loading branch information
mj12albert authored Dec 11, 2023
1 parent aa9e615 commit 2b08128
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
5 changes: 0 additions & 5 deletions packages/mui-material/src/InputLabel/InputLabel.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,6 @@ const InputLabelRoot = styled(FormLabel, {
transform: 'translate(14px, -9px) scale(0.75)',
}),
}),
...(ownerState.variant === 'standard' && {
'&:not(label) + div': {
marginTop: 16,
},
}),
}));

const InputLabel = React.forwardRef(function InputLabel(inProps, ref) {
Expand Down
4 changes: 1 addition & 3 deletions packages/mui-material/src/Select/SelectInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,6 @@ const SelectInput = React.forwardRef(function SelectInput(props, ref) {

const listboxId = useId();

const hiddenInputId = useId();

return (
<React.Fragment>
<SelectSelect
Expand Down Expand Up @@ -525,7 +523,7 @@ const SelectInput = React.forwardRef(function SelectInput(props, ref) {
<SelectNativeInput
aria-invalid={error}
value={Array.isArray(value) ? value.join(',') : value}
name={name ?? hiddenInputId}
name={name}
ref={inputRef}
aria-hidden
onChange={handleChange}
Expand Down

0 comments on commit 2b08128

Please sign in to comment.