-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
[material-ui][select] Fix assigning of id to Select #47498
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -257,10 +257,10 @@ const TextField = React.forwardRef(function TextField(inProps, ref) { | |
| {select ? ( | ||
| <SelectSlot | ||
| aria-describedby={helperTextId} | ||
| id={id} | ||
| labelId={inputLabelId} | ||
| value={value} | ||
| input={InputElement} | ||
| inputProps={{ id }} | ||
| {...selectProps} | ||
|
Comment on lines
258
to
264
|
||
| > | ||
| {children} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -276,7 +276,7 @@ describe('<TextField />', () => { | |
| ); | ||
|
|
||
| const input = container.querySelector('input[aria-hidden]'); | ||
|
||
| expect(input).not.to.have.attribute('id'); | ||
| expect(input).to.have.attribute('id'); | ||
| expect(input).not.to.have.attribute('aria-describedby'); | ||
| }); | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed this
idas it was sending todiv role='combobox'There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be a breaking change. We cannot remove the
idof the combobox. Theidpassed onSelectis of div combobox.See the comment #38869 (comment):
See discussions in #38869 and #47489