Skip to content

Commit

Permalink
fix(combobox): ensure disabled items get proper scale (#11400)
Browse files Browse the repository at this point in the history
**Related Issue:** #9888 

## Summary
Copied the scale and selectionMode to disabled items; fixed broken test.
  • Loading branch information
josercarcamo authored Jan 29, 2025
1 parent f82bb5e commit 49cc976
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2593,9 +2593,10 @@ describe("calcite-combobox", () => {
<calcite-combobox-item-group label="Conifers">
<calcite-combobox-item value="Pine" text-label="Pine"></calcite-combobox-item>
</calcite-combobox-item-group>
<calcite-combobox-item value="DisabledItem" text-label="DisabledItem" disabled></calcite-combobox-item>
</calcite-combobox>
`);
const comboboxItems = await page.findAll("calcite-combobox-items");
const comboboxItems = await page.findAll("calcite-combobox-item");

for (const item of comboboxItems) {
expect(await item.getProperty("selectionMode")).toBe("single");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ export class Combobox
}

private updateItemProps(): void {
this.items.forEach((item) => {
this.getItems(true).forEach((item) => {
item.selectionMode = this.selectionMode;
item.scale = this.scale;
});
Expand Down

0 comments on commit 49cc976

Please sign in to comment.