Skip to content

Commit

Permalink
chore: added slottable-request handling in interactionController
Browse files Browse the repository at this point in the history
  • Loading branch information
TarunAdobe committed Jul 8, 2024
1 parent f61dc96 commit aaef850
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 4 additions & 0 deletions packages/picker/src/InteractionController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ export class InteractionController implements ReactiveController {
this.overlay.receivesFocus = 'true';
this.overlay.willPreventClose =
this.preventNextToggle !== 'no' && this.open;
this.overlay.addEventListener(
'slottable-request',
this.host.handleSlottableRequest
);
}
}

Expand Down
4 changes: 1 addition & 3 deletions packages/picker/src/Picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,7 @@ export class PickerBase extends SizedMixin(Focusable, { noDefaultSize: true }) {
| undefined;
}

protected handleSlottableRequest = (
_event: SlottableRequestEvent
): void => {};
public handleSlottableRequest = (_event: SlottableRequestEvent): void => {};

protected renderLabelContent(content: Node[]): TemplateResult | Node[] {
if (this.value && this.selectedItem) {
Expand Down

0 comments on commit aaef850

Please sign in to comment.