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

[docs][autocomplete] Fix duplicate autocomplete id #42086

Merged
merged 4 commits into from
May 3, 2024
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
1 change: 0 additions & 1 deletion docs/data/joy/components/autocomplete/CountrySelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import Typography from '@mui/joy/Typography';
export default function CountrySelect() {
return (
<Autocomplete
id="country-select-demo"
placeholder="Choose a country"
slotProps={{
input: {
Expand Down
1 change: 0 additions & 1 deletion docs/data/joy/components/autocomplete/CountrySelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import Typography from '@mui/joy/Typography';
export default function CountrySelect() {
return (
<Autocomplete
id="country-select-demo"
placeholder="Choose a country"
slotProps={{
input: {
Expand Down
1 change: 0 additions & 1 deletion docs/data/joy/components/autocomplete/CustomTags.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import Close from '@mui/icons-material/Close';
export default function CustomTags() {
return (
<Autocomplete
id="tags-default"
multiple
placeholder="Favorites"
options={top100Films}
Expand Down
1 change: 0 additions & 1 deletion docs/data/joy/components/autocomplete/CustomTags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import Close from '@mui/icons-material/Close';
export default function CustomTags() {
return (
<Autocomplete
id="tags-default"
multiple
placeholder="Favorites"
options={top100Films}
Expand Down
1 change: 0 additions & 1 deletion docs/data/material/components/autocomplete/Asynchronous.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export default function Asynchronous() {

return (
<Autocomplete
id="asynchronous-demo"
sx={{ width: 300 }}
open={open}
onOpen={() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export default function Asynchronous() {

return (
<Autocomplete
id="asynchronous-demo"
sx={{ width: 300 }}
open={open}
onOpen={() => {
Expand Down
1 change: 0 additions & 1 deletion docs/data/material/components/autocomplete/ComboBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export default function ComboBox() {
return (
<Autocomplete
disablePortal
id="combo-box-demo"
options={top100Films}
sx={{ width: 300 }}
renderInput={(params) => <TextField {...params} label="Movie" />}
Expand Down
1 change: 0 additions & 1 deletion docs/data/material/components/autocomplete/ComboBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export default function ComboBox() {
return (
<Autocomplete
disablePortal
id="combo-box-demo"
options={top100Films}
sx={{ width: 300 }}
renderInput={(params) => <TextField {...params} label="Movie" />}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Autocomplete
disablePortal
id="combo-box-demo"
options={top100Films}
sx={{ width: 300 }}
renderInput={(params) => <TextField {...params} label="Movie" />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import Autocomplete from '@mui/material/Autocomplete';
export default function DisabledOptions() {
return (
<Autocomplete
id="disabled-options-demo"
options={timeSlots}
getOptionDisabled={(option) =>
option === timeSlots[0] || option === timeSlots[2]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import Autocomplete from '@mui/material/Autocomplete';
export default function DisabledOptions() {
return (
<Autocomplete
id="disabled-options-demo"
options={timeSlots}
getOptionDisabled={(option) =>
option === timeSlots[0] || option === timeSlots[2]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<Autocomplete
id="disabled-options-demo"
options={timeSlots}
getOptionDisabled={(option) =>
option === timeSlots[0] || option === timeSlots[2]
Expand Down
1 change: 0 additions & 1 deletion docs/data/material/components/autocomplete/Filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const filterOptions = createFilterOptions({
export default function Filter() {
return (
<Autocomplete
id="filter-demo"
options={top100Films}
getOptionLabel={(option) => option.title}
filterOptions={filterOptions}
Expand Down
1 change: 0 additions & 1 deletion docs/data/material/components/autocomplete/Filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const filterOptions = createFilterOptions({
export default function Filter() {
return (
<Autocomplete
id="filter-demo"
options={top100Films}
getOptionLabel={(option) => option.title}
filterOptions={filterOptions}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<Autocomplete
id="filter-demo"
options={top100Films}
getOptionLabel={(option) => option.title}
filterOptions={filterOptions}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ function MovieSelect() {
function CountrySelect() {
return (
<Autocomplete
id="country-customized-option-demo"
options={countries}
disableCloseOnSelect
getOptionLabel={(option) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ function MovieSelect() {
function CountrySelect() {
return (
<Autocomplete
id="country-customized-option-demo"
options={countries}
disableCloseOnSelect
getOptionLabel={(option: CountryType) =>
Expand Down
1 change: 0 additions & 1 deletion docs/data/material/components/autocomplete/GoogleMaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ export default function GoogleMaps() {

return (
<Autocomplete
id="google-map-demo"
sx={{ width: 300 }}
getOptionLabel={(option) =>
typeof option === 'string' ? option : option.description
Expand Down
1 change: 0 additions & 1 deletion docs/data/material/components/autocomplete/GoogleMaps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ export default function GoogleMaps() {

return (
<Autocomplete
id="google-map-demo"
sx={{ width: 300 }}
getOptionLabel={(option) =>
typeof option === 'string' ? option : option.description
Expand Down
1 change: 0 additions & 1 deletion docs/data/material/components/autocomplete/Grouped.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export default function Grouped() {

return (
<Autocomplete
id="grouped-demo"
options={options.sort((a, b) => -b.firstLetter.localeCompare(a.firstLetter))}
groupBy={(option) => option.firstLetter}
getOptionLabel={(option) => option.title}
Expand Down
1 change: 0 additions & 1 deletion docs/data/material/components/autocomplete/Grouped.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export default function Grouped() {

return (
<Autocomplete
id="grouped-demo"
options={options.sort((a, b) => -b.firstLetter.localeCompare(a.firstLetter))}
groupBy={(option) => option.firstLetter}
getOptionLabel={(option) => option.title}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<Autocomplete
id="grouped-demo"
options={options.sort((a, b) => -b.firstLetter.localeCompare(a.firstLetter))}
groupBy={(option) => option.firstLetter}
getOptionLabel={(option) => option.title}
Expand Down
1 change: 0 additions & 1 deletion docs/data/material/components/autocomplete/Highlights.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import match from 'autosuggest-highlight/match';
export default function Highlights() {
return (
<Autocomplete
id="highlights-demo"
sx={{ width: 300 }}
options={top100Films}
getOptionLabel={(option) => option.title}
Expand Down
1 change: 0 additions & 1 deletion docs/data/material/components/autocomplete/Highlights.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import match from 'autosuggest-highlight/match';
export default function Highlights() {
return (
<Autocomplete
id="highlights-demo"
sx={{ width: 300 }}
options={top100Films}
getOptionLabel={(option) => option.title}
Expand Down
1 change: 0 additions & 1 deletion docs/data/material/components/autocomplete/RenderGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export default function RenderGroup() {

return (
<Autocomplete
id="grouped-demo"
options={options.sort((a, b) => -b.firstLetter.localeCompare(a.firstLetter))}
groupBy={(option) => option.firstLetter}
getOptionLabel={(option) => option.title}
Expand Down
1 change: 0 additions & 1 deletion docs/data/material/components/autocomplete/RenderGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export default function RenderGroup() {

return (
<Autocomplete
id="grouped-demo"
options={options.sort((a, b) => -b.firstLetter.localeCompare(a.firstLetter))}
groupBy={(option) => option.firstLetter}
getOptionLabel={(option) => option.title}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<Autocomplete
id="grouped-demo"
options={options.sort((a, b) => -b.firstLetter.localeCompare(a.firstLetter))}
groupBy={(option) => option.firstLetter}
getOptionLabel={(option) => option.title}
Expand Down
1 change: 0 additions & 1 deletion docs/data/material/components/autocomplete/Virtualize.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ const OPTIONS = Array.from(new Array(10000))
export default function Virtualize() {
return (
<Autocomplete
id="virtualize-demo"
sx={{ width: 300 }}
disableListWrap
PopperComponent={StyledPopper}
Expand Down
1 change: 0 additions & 1 deletion docs/data/material/components/autocomplete/Virtualize.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ const OPTIONS = Array.from(new Array(10000))
export default function Virtualize() {
return (
<Autocomplete
id="virtualize-demo"
sx={{ width: 300 }}
disableListWrap
PopperComponent={StyledPopper}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<Autocomplete
id="virtualize-demo"
sx={{ width: 300 }}
disableListWrap
PopperComponent={StyledPopper}
Expand Down
Loading