diff --git a/packages/calcite-components/src/components/action-bar/action-bar.tsx b/packages/calcite-components/src/components/action-bar/action-bar.tsx index b0ab3d5a355..43b3bf58c99 100755 --- a/packages/calcite-components/src/components/action-bar/action-bar.tsx +++ b/packages/calcite-components/src/components/action-bar/action-bar.tsx @@ -182,6 +182,8 @@ export class ActionBar @State() hasActionsEnd = false; + @State() hasBottomActions = false; + @State() expandTooltip: HTMLCalciteTooltipElement; @Watch("effectiveLocale") @@ -305,7 +307,9 @@ export class ActionBar this.setGroupLayout(actionGroups); const groupCount = - this.hasActionsEnd || !expandDisabled ? actionGroups.length + 1 : actionGroups.length; + this.hasActionsEnd || this.hasBottomActions || !expandDisabled + ? actionGroups.length + 1 + : actionGroups.length; const { actionHeight, actionWidth } = geActionDimensions(actions); @@ -355,6 +359,10 @@ export class ActionBar this.hasActionsEnd = slotChangeHasAssignedElement(event); }; + handleBottomActionsSlotChange = (event: Event): void => { + this.hasBottomActions = slotChangeHasAssignedElement(event); + }; + handleTooltipSlotChange = (event: Event): void => { const tooltips = slotChangeGetAssignedElements(event).filter((el) => el?.matches("calcite-tooltip") @@ -390,12 +398,12 @@ export class ActionBar return ( diff --git a/packages/calcite-components/src/components/action-bar/resources.ts b/packages/calcite-components/src/components/action-bar/resources.ts index 0f44055d831..7881e338707 100644 --- a/packages/calcite-components/src/components/action-bar/resources.ts +++ b/packages/calcite-components/src/components/action-bar/resources.ts @@ -4,6 +4,6 @@ export const CSS = { export const SLOTS = { actionsEnd: "actions-end", - bottomActions: "actions-end", + bottomActions: "bottom-actions", expandTooltip: "expand-tooltip", };