Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "[Select][material-ui] Add name to hidden input element" #40174

Merged
merged 1 commit into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading