ConditionalIconItem Class
Class used to return an icon. The icon is variable and can be changed in response to subscribed event ids.
Methods
Name | Description | |
---|---|---|
constructor(iconGetter: () => IconSpec, syncEventIds: string[], value?: IconSpec): ConditionalIconItem | Constructor for ConditionalIconItem | |
refresh(): boolean | Called to update the value by running the iconGetter | |
getValue(conditionalValue: undefined | string | ConditionalIconItem): IconSpec Static | helper function to get the iconSpec from a ConditionIconItem as IconSpec | undefined | |
refreshValue(conditionalValue: undefined | string | ConditionalIconItem, eventIds: Set<string>): boolean Static | A helper function that updates the IconSpec value when the specified events are triggered |
Properties
Name | Type | Description | |
---|---|---|---|
iconGetter Readonly | () => IconSpec | ||
syncEventIds Readonly | string[] | The array of event ids to be monitored. | |
value Accessor ReadOnly | IconSpec | The current IconSpec according to conditions |
Defined in
Last Updated: 05 April, 2024
Found something wrong, missing, or unclear on this page?
Raise an issue in our repo.