Skip to content

Commit

Permalink
fix(core): Resolve focus retention & rendering issues, add feature en…
Browse files Browse the repository at this point in the history
…hancements

closes [#12369](#12369)

## Description
Remove unused event handlers and update focus behavior
  • Loading branch information
khotcholava committed Oct 25, 2024
1 parent f587f50 commit 4373cde
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 21 deletions.
7 changes: 1 addition & 6 deletions libs/core/avatar-group/avatar-group.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
[focusAutoCapture]="true"
fdkResizeObserver
(resized)="_detectChanges()"
(isOpenChange)="handlePopoverOpen($event)"
>
<fd-popover-control>
<fd-avatar-group-host
Expand Down Expand Up @@ -117,10 +116,6 @@
[ngTemplateOutletContext]="{ hiddenItems: hiddenItems }"
/>
} @else {
<fd-default-avatar-group-overflow-body
(back)="handleBack()"
[avatars]="hiddenItems"
[overflowPopoverTitle]="overflowPopoverTitle"
/>
<fd-default-avatar-group-overflow-body [avatars]="hiddenItems" [overflowPopoverTitle]="overflowPopoverTitle" />
}
</ng-template>
13 changes: 0 additions & 13 deletions libs/core/avatar-group/avatar-group.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,17 +144,4 @@ export class AvatarGroupComponent implements AvatarGroupHostConfig {
_detectChanges(): void {
this._cdr.detectChanges();
}

/** @hidden */
handlePopoverOpen(isOpen: boolean): void {
this.opened = isOpen;
if (isOpen) {
this.defaultAvatarGroupOverflowBody._avatarGroupItemPortals.first.setTabbable(true);
}
}

/** @hidden */
handleBack(): void {
this.handlePopoverOpen(this.opened);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ export class AvatarGroupItemRendererDirective implements OnInit, FocusableItem {
this._embeddedViewRef = this._portalOutlet.attach(this._templatePortal);
this._embeddedViewRef.detectChanges();
this._element$.next(this.element);
this.setTabbable(this._hostConfig.type === 'individual');
this._isFocusable = this._hostConfig.type === 'individual';
this.setTabbable(true);
this._isFocusable = true;
}

/**
Expand Down

0 comments on commit 4373cde

Please sign in to comment.