Skip to content

Commit

Permalink
[Autocomplete] Fix disabled + multiple combination support (#19041)
Browse files Browse the repository at this point in the history
  • Loading branch information
cvanem authored and oliviertassinari committed Dec 31, 2019
1 parent f38c262 commit a07f180
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/src/pages/components/autocomplete/FixedTags.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function FixedTags() {
defaultValue={[top100Films[6], top100Films[13]]}
renderTags={(value, getTagProps) =>
value.map((option, index) => (
<Chip disabled={index === 0} label={option.title} {...getTagProps({ index })} />
<Chip label={option.title} {...getTagProps({ index })} disabled={index === 0} />
))
}
style={{ width: 500 }}
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/autocomplete/FixedTags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function FixedTags() {
defaultValue={[top100Films[6], top100Films[13]]}
renderTags={(value: FilmOptionType[], getTagProps) =>
value.map((option: FilmOptionType, index: number) => (
<Chip disabled={index === 0} label={option.title} {...getTagProps({ index })} />
<Chip label={option.title} {...getTagProps({ index })} disabled={index === 0} />
))
}
style={{ width: 500 }}
Expand Down
1 change: 1 addition & 0 deletions packages/material-ui-lab/src/Autocomplete/Autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ const Autocomplete = React.forwardRef(function Autocomplete(props, ref) {
className: clsx(classes.tag, {
[classes.tagSizeSmall]: size === 'small',
}),
disabled,
...getTagProps(params),
});

Expand Down

0 comments on commit a07f180

Please sign in to comment.