Skip to content

Commit 782ca76

Browse files
committed
fix: prevent label from shrinking with all-chips-visible (#6721)
1 parent 875fc5f commit 782ca76

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

packages/multi-select-combo-box/test/visual/lumo/multi-select-combo-box.test.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,17 @@ describe('multi-select-combo-box', () => {
134134
element.style.maxWidth = '250px';
135135
await visualDiff(div, 'all-chips-visible-max-width');
136136
});
137+
138+
it('all chips visible height', async () => {
139+
element.label = 'Label';
140+
element.style.width = '300px';
141+
element.style.height = '200px';
142+
div.style.height = '240px';
143+
const items = Array.from({ length: 20 }).map((_, i) => `Item ${i}`);
144+
element.items = items;
145+
element.selectedItems = items;
146+
await visualDiff(div, 'all-chips-visible-height');
147+
});
137148
});
138149

139150
describe('opened', () => {
13.2 KB
Loading

packages/multi-select-combo-box/theme/lumo/vaadin-multi-select-combo-box-styles.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ const multiSelectComboBox = css`
4444
caret-color: var(--lumo-body-text-color) !important;
4545
}
4646
47+
[part='label'] {
48+
flex-shrink: 0;
49+
}
50+
4751
[part~='chip']:not(:last-of-type) {
4852
margin-inline-end: var(--lumo-space-xs);
4953
}

0 commit comments

Comments
 (0)