diff --git a/src/components.d.ts b/src/components.d.ts index 904c25cc5..ab9ec8178 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -1776,6 +1776,7 @@ declare global { "smoothlyInputLoad": (parent: Editable) => void; "smoothlyFormDisable": (disabled: boolean) => void; "smoothlyItemSelect": HTMLSmoothlyItemElement; + "smoothlySelectOpen": boolean; } interface HTMLSmoothlyInputSelectElement extends Components.SmoothlyInputSelect, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLSmoothlyInputSelectElement, ev: SmoothlyInputSelectCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; @@ -2845,6 +2846,7 @@ declare namespace LocalJSX { "onSmoothlyInputLoad"?: (event: SmoothlyInputSelectCustomEvent<(parent: Editable) => void>) => void; "onSmoothlyInputLooks"?: (event: SmoothlyInputSelectCustomEvent<(looks?: Looks, color?: Color) => void>) => void; "onSmoothlyItemSelect"?: (event: SmoothlyInputSelectCustomEvent) => void; + "onSmoothlySelectOpen"?: (event: SmoothlyInputSelectCustomEvent) => void; "onSmoothlyUserInput"?: (event: SmoothlyInputSelectCustomEvent) => void; "ordered"?: boolean; "placeholder"?: string | any; diff --git a/src/components/input/select/index.tsx b/src/components/input/select/index.tsx index 9e2a52216..345354c49 100644 --- a/src/components/input/select/index.tsx +++ b/src/components/input/select/index.tsx @@ -68,6 +68,7 @@ export class SmoothlyInputSelect implements Input, Editable, Clearable, Componen @Event() smoothlyInputLoad: EventEmitter<(parent: Editable) => void> @Event() smoothlyFormDisable: EventEmitter<(disabled: boolean) => void> @Event() smoothlyItemSelect: EventEmitter + @Event() smoothlySelectOpen: EventEmitter componentWillLoad(): void | Promise { this.smoothlyInputLooks.emit( @@ -231,6 +232,7 @@ export class SmoothlyInputSelect implements Input, Editable, Clearable, Componen markedItem.marked = false } } + this.smoothlySelectOpen.emit(open) } handleShowOptions(event?: Event): void { const wasButtonClicked =