Commit 85a4301
fix: preserve user-provided id on Autocomplete input (#4682)
* fix: preserve user-provided id on Autocomplete input
Pass user-provided id as inputId to downshift's useCombobox so it is
used consistently for the input element, label htmlFor, and all
related aria attributes. Closes #4588
* fix: for pull request finding 'Unused variable, import, function or class'
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
* fix: address review feedback on Autocomplete id test
Remove unused variable and use getByRole instead of container
querySelector to satisfy testing-library lint rules.
* fix: restore lost changes and snapshot from rebase
Re-apply inputId fix in useAutocomplete and test cases that were
lost during rebase. Restore snapshot from main to match CI environment.
---------
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>1 parent cfd254c commit 85a4301
2 files changed
Lines changed: 17 additions & 0 deletions
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
141 | 156 | | |
142 | 157 | | |
143 | 158 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
295 | 296 | | |
296 | 297 | | |
297 | 298 | | |
| 299 | + | |
298 | 300 | | |
299 | 301 | | |
300 | 302 | | |
| |||
0 commit comments