Skip to main content

Class: UserSettingSelectController<T, K>

A controller which binds a user setting that can take one of several enumerated values to a SelectControl component.

Type parameters

NameType
Textends UserSettingRecord
Kextends keyof T & string

Hierarchy

Constructors

constructor

new UserSettingSelectController<T, K>(settingManager, settingName, values, selectControlRef): UserSettingSelectController<T, K>

Constructor.

Type parameters

NameType
Textends UserSettingRecord
Kextends string

Parameters

NameTypeDescription
settingManagerUserSettingManager<T>This controller's settings manager.
settingNameKThe name of the setting associated with this controller.
valuesSubscribableArray<NonNullable<T[K]>>A subscribable array which provides the values this controller can assign to its setting.
selectControlRefNodeReference<SelectControl<NonNullable<T[K]>>>A node reference to the SelectControl which this controller controls.

Returns

UserSettingSelectController<T, K>

Overrides

UserSettingController.constructor

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/UserSettings/UserSettingSelectController.ts:24

Properties

itemSelectedHandler

itemSelectedHandler: (index: number, item: undefined | NonNullable<T[K]>, isRefresh: boolean) => void

A function which handles item selected events from the SelectControl component which this controller controls. This handler should be passed to the SelectControl component via its onItemSelected prop.

Type declaration

▸ (index, item, isRefresh): void

A function which handles item selected events from the SelectControl component which this controller controls. This handler should be passed to the SelectControl component via its onItemSelected prop.

Parameters
NameType
indexnumber
itemundefined | NonNullable<T[K]>
isRefreshboolean
Returns

void

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/UserSettings/UserSettingSelectController.ts:15


setting

Readonly setting: UserSetting<NonNullable<T[K]>>

The setting associated with this controller.

Inherited from

UserSettingController.setting

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/UserSettings/UserSettingController.ts:8


settingManager

Readonly settingManager: UserSettingManager<T>

This controller's settings manager.

Inherited from

UserSettingController.settingManager

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/UserSettings/UserSettingSelectController.ts:25


settingName

Readonly settingName: K

The name of the setting associated with this controller.

Inherited from

UserSettingController.settingName

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/UserSettings/UserSettingSelectController.ts:26


values

Readonly values: SubscribableArray<NonNullable<T[K]>>

A subscribable array which provides the values this controller can assign to its setting.

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/UserSettings/UserSettingSelectController.ts:27

Methods

init

init(): void

Initializes this controller. This will immediately change the state of this controller's control component to reflect the current value of this controller's setting. Furthermore, any future changes to the setting's value will be synced to the control component.

Returns

void

Overrides

UserSettingController.init

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/UserSettings/UserSettingSelectController.ts:34


onSettingChanged

onSettingChanged(value): void

A callback which is called when value of this control's setting is changed.

Parameters

NameTypeDescription
valueNonNullable<T[K]>The new value of the setting.

Returns

void

Overrides

UserSettingController.onSettingChanged

Defined in

workingtitle-instruments-g1000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG1000/Shared/UI/UserSettings/UserSettingSelectController.ts:39