Skip to content

Commit

Permalink
fix(chip): disabled attribute prevents click event.
Browse files Browse the repository at this point in the history
  • Loading branch information
vdegenne committed Nov 28, 2023
1 parent 33c1afe commit d501ddd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions chips/internal/_shared.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
margin: max(0px, (48px - var(--_container-height)) / 2) 0;
}

:host([disabled]) {
pointer-events: none;
}

md-focus-ring {
@include focus-ring.theme(
(
Expand Down
2 changes: 1 addition & 1 deletion chips/internal/chip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export abstract class Chip extends LitElement {
*
* Disabled chips are not focusable, unless `always-focusable` is set.
*/
@property({type: Boolean}) disabled = false;
@property({type: Boolean, reflect: true}) disabled = false;

/**
* When true, allow disabled chips to be focused with arrow keys.
Expand Down

0 comments on commit d501ddd

Please sign in to comment.