Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(action-pad): update layout on action-group elements slotted after initialization #10355

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,18 @@ describe("calcite-action-bar", () => {
await page.waitForChanges();

expect(await group.getProperty("layout")).toBe("vertical");

actionBar.innerHTML = html`
<calcite-action-group></calcite-action-group>
<calcite-action-group></calcite-action-group>
`;
await page.waitForChanges();

const groups = await page.findAll("calcite-action-group");

groups.forEach(async (group) => {
expect(await group.getProperty("layout")).toBe("vertical");
});
});

describe("theme", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,18 @@ describe("calcite-action-pad", () => {
await page.waitForChanges();

expect(await group.getProperty("layout")).toBe("vertical");

actionPad.innerHTML = html`
<calcite-action-group></calcite-action-group>
<calcite-action-group></calcite-action-group>
`;
await page.waitForChanges();

const groups = await page.findAll("calcite-action-group");

groups.forEach(async (group) => {
expect(await group.getProperty("layout")).toBe("vertical");
});
});

describe("theme", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,14 @@ export class ActionPad
connectConditionalSlotComponent(this);
connectLocalized(this);
connectMessages(this);
this.mutationObserver?.observe(this.el, { childList: true, subtree: true });
}

disconnectedCallback(): void {
disconnectLocalized(this);
disconnectMessages(this);
disconnectConditionalSlotComponent(this);
this.mutationObserver?.disconnect();
}

async componentWillLoad(): Promise<void> {
Expand Down
Loading