How can I make a chip list wrap?

1 Answer 14 Views
Chip ChipList Grid
JohnL4
Top achievements
Rank 1
JohnL4 asked on 28 Sep 2021, 02:06 PM

How can I make a chip list wrap, particularly in a grid cell? I've noticed that <kendo-chip-list> generates a span with a display style of "inline-flex", which seems to make a one-row flexbox that goes shooting off to the right, past my window border. I have enough vertical space for a wrap and that's what I'd prefer.

I can leave off the <kendo-chip-list> element and just go straight to <kendo-chip *ngFor="...">, and that suits my purpose since I don't need to be able to select chips, but if I did, I'd be stuck.

I can also include <kendo-chip-list> and slap in a style="flex-wrap: wrap;", but that seems inelegant.

What have I missed?

1 Answer, 1 is accepted

Sort by
0
Accepted
Hetali
Telerik team
answered on 28 Sep 2021, 05:02 PM

Hi John,

To wrap the Kendo UI ChipList in the Grid Cell, set the display to 'inline-block'. For example:

.k-chip-list {
  display: inline-block;
}

In this StackBlitz example, I have changed the display of the ChipList to 'inline-block' and it is wrapped within the Grid Cell.

Please let me know if this solution helps or if I can further assist you.

Regards,
Hetali
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

JohnL4
Top achievements
Rank 1
commented on 29 Sep 2021, 05:49 PM

Nice, thanks!
Tags
Chip ChipList Grid
Asked by
JohnL4
Top achievements
Rank 1
Answers by
Hetali
Telerik team
Share this question
or