Skip to content

Commit

Permalink
fix: added default focus in focus group
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajdeep Chandra authored and Westbrook committed Aug 18, 2023
1 parent cd59f18 commit 1abe7e7
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/tags/src/Tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class Tags extends FocusVisiblePolyfillMixin(SpectrumElement) {

focusGroupController = new FocusGroupController<Tag>(this, {
direction: 'vertical',
elements: () => this.tags
elements: () => this.tags,
});

constructor() {
Expand Down Expand Up @@ -122,16 +122,15 @@ export class Tags extends FocusVisiblePolyfillMixin(SpectrumElement) {
// no deleting when there aren't items.
return;
}
this.focusGroupController.changeDefaultItemFocus()
this.focusGroupController.changeDefaultItemFocus();
}


protected override render(): TemplateResult {
return html`
<slot
<slot
@slotchange=${this.handleSlotchange}
@sp-tag-focus=${this.changeDefaultFocus}
</slot>
></slot>
`;
}

Expand Down

0 comments on commit 1abe7e7

Please sign in to comment.