State component allows saving and restoring the state of the grid features.
Constructors
Section titled "Constructors"IgcGridStateComponent
new IgcGridStateComponent(args: any[]): IgcGridStateComponent Returns IgcGridStateComponent
Properties
Section titled "Properties"tagName
Section titled "tagName"The tagName read-only property of the Element interface returns the tag name of the element on which it's called.
tagName: string Accessors
Section titled "Accessors"options
Section titled "options"Inherited from: EventEmitterMixin<IgcGridStateComponentEventMap, Constructor<IgcGridStateBaseDirective>>(IgcGridStateBaseDirective)
get options(): IgcGridStateOptions
Returns IgcGridStateOptions
An object with options determining if a certain feature state should be saved.
set options(value: IgcGridStateOptions): void Parameters
- value:
IgcGridStateOptions
Returns void
Methods
Section titled "Methods"addEventListener
Section titled "addEventListener"Inherited from: EventEmitterMixin<IgcGridStateComponentEventMap, Constructor<IgcGridStateBaseDirective>>(IgcGridStateBaseDirective)
addEventListener(type: K, listener: object, options: boolean | AddEventListenerOptions): void Parameters
- type:
K - listener:
object - options:
boolean | AddEventListenerOptions
Returns void
applyState
Section titled "applyState"Restores grid features' state based on the IGridStateInfo object passed as an argument.
applyState(state: IgcGridStateInfo, features: string[]): void Parameters
- state:
IgcGridStateInfoobject to restore state from.
- features:
string[]
Returns void
applyStateFromString
Section titled "applyStateFromString"Restores grid features' state based on the serialized IGridState object passed as an argument.
applyStateFromString(state: string, features: string[]): void Parameters
- state:
stringstring to restore state from.
- features:
string[]
Returns void
getState
Section titled "getState"Gets the state of a feature or states of all grid features, unless a certain feature is disabled through the options property.
getState(features: string[]): IgcGridStateInfo Parameters
- features:
string[]
Returns IgcGridStateInfo
getStateAsString
Section titled "getStateAsString"Gets the state of a feature or states of all grid features, unless a certain feature is disabled through the options property.
getStateAsString(features: string[]): string Parameters
- features:
string[]
Returns string
removeEventListener
Section titled "removeEventListener"Inherited from: EventEmitterMixin<IgcGridStateComponentEventMap, Constructor<IgcGridStateBaseDirective>>(IgcGridStateBaseDirective)
removeEventListener(type: K, listener: object, options: boolean | EventListenerOptions): void Parameters
- type:
K - listener:
object - options:
boolean | EventListenerOptions
Returns void
register
Section titled "register"register(): void Returns void
Events
Section titled "Events"stateParsed
Section titled "stateParsed"Event emitted when set state is called with a string. Returns the parsed state object so that it can be further modified before applying to the grid.
stateParsed: CustomEvent<IgcGridStateInfo>