BUG: mat-chip without mat-chip-list has no styles
See original GitHub issueBug, feature request, or proposal:
Bug
What is the expected behavior?
<mat-chip>
without parent <mat-chip-list>
should render the same styles.
chip.scss is only injected to the <mat-chip-list>
component.
What is the current behavior?
<mat-chip>
has no styles.
What are the steps to reproduce?
add <mat-chip>
to template without <mat-chip-list>
stackblitz
What is the use-case or motivation for changing an existing behavior?
i dont want to add the <mat-chip-list>
if i render only one chip
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
angular: 5.2.2 material: 5.1.0 typescript: 2.6.2 os: * browsers: *
Is there anything else we should know?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:47
- Comments:26 (4 by maintainers)
Top Results From Across the Web
Angular material mat-chip-list with input not showing ...
Problem: When I remove all the elements from the input field, the parent form (formGroup) is marked as invalid but the error property...
Read more >Chips
By default, <mat-chip> renders a chip with Material Design styles applied. For a chip with no styles applied, use <mat-basic-chip> . Hint: <mat-basic-chip> ......
Read more >Chips | Angular Material
An object used to control when error messages are shown. ... When a chip list is not selectable, the selected states for all...
Read more >Angular Matchiplist With Error Message (forked)
Chips with input with error message. ... <mat-form-field class="demo-chip-list">. <mat-chip-list #chipList> ... MIT-style license that.
Read more >How to use <mat-chip-list> and <mat-chip> in Angular ...
Angular Material is a UI component library that is developed by the Angular team to build design components for desktop and mobile web ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have just encountered this “bug”/“design flaw”. I was about to write an issue:
Workaround:
<mat-chip-list></mat-chip-list>
somewhere in your template. Then you can usemat-chips
as stand-alones.Weird thing is, when adding a
mat-chip-list
, it works correctly for all mat-chips.