Skip to main content
cngx-src documentation

createTriggerFocusState

Functionforms/select

projects/forms/select/shared/trigger-focus.ts

Description#

Builds the focus-state slot.

private readonly focus = inject(CNGX_TRIGGER_FOCUS_FACTORY)();
readonly focused = this.focus.focused;

protected handleFocus(): void {
  this.focus.markFocused();
  if (this.config.openOn === 'focus') this.open();
}

Signature#

createTriggerFocusState()

Returns#

CngxTriggerFocusState