ConditionalIconItem Class
Deprecated in 4.16.0. Uses a deprecated IconSpec type. Use conditional rendering to render different icons.
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: string | ConditionalIconItem): IconSpec Static | helper function to get the iconSpec from a ConditionIconItem as IconSpec | undefined | |
refreshValue(conditionalValue: 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 | Function to retrieve the icon that matches the condition. | |
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: 20 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.