UNPKG

@instawork/design-system

Version:

The design system for Instawork's web apps

22 lines (21 loc) 713 B
import { CustomInputComponent } from '../custom-input'; declare global { interface JQuery { iwOtherField(): JQuery; } } /** * A jQuery plugin can automatically hide and show a text field for a select input with an "other" option */ export declare class OtherFieldComponent extends CustomInputComponent { static readonly COMPONENT_ATTR = "iw-other-field"; static readonly COMPONENT_SELECTOR: string; static readonly ATTR_OTHER_VALUE: string; static loadPlugin(): void; readonly $form: JQuery<HTMLFormElement>; readonly $other: JQuery; readonly otherValue: string; constructor($el: JQuery); protected initEvents(): void; protected onSelectChange(): void; }