diff --git a/chips/internal/filter-chip.ts b/chips/internal/filter-chip.ts index 5d04bb5c44..ef32cacf18 100644 --- a/chips/internal/filter-chip.ts +++ b/chips/internal/filter-chip.ts @@ -25,6 +25,15 @@ export class FilterChip extends MultiActionChip { @property({type: Boolean}) removable = false; @property({type: Boolean, reflect: true}) selected = false; + /** + * Only needed for SSR. + * + * Add this attribute when a filter chip has a `slot="selected-icon"` to avoid + * a Flash Of Unstyled Content. + */ + @property({type: Boolean, reflect: true, attribute: 'has-selected-icon'}) + hasSelectedIcon = false; + protected get primaryId() { return 'button'; } @@ -65,10 +74,12 @@ export class FilterChip extends MultiActionChip { } return html` - + + + `; }