Class IgxGridStateDirective

プロパティ

アクセサー

メソッド

プロパティ

grid: GridType
stateParsed: EventEmitter<IGridState> = ...

設定状態が文字列で呼び出されたときに発生するイベントです。 グリッドに適用する前にさらに変更できるように解析済み状態オブジェクトを返します。

this.state.stateParsed.subscribe(parsedState => parsedState.sorting.forEach(x => x.strategy = NoopSortingStrategy.instance()});

アクセサー

メソッド

  • 特定の機能が options プロパティによって無効にされていない場合、機能の状態またはすべてのグリッド機能の状態を取得します。

    返却

    シリアル化された JSON 文字列 IGridState オブジェクト、またはシリアル化されていない IGridState オブジェクトを返します。

    <igx-grid [igxGridState]="options"></igx-grid>
    
    @ViewChild(IgxGridStateDirective, { static: true }) public state;
    let state = this.state.getState(); // returns string
    let state = this.state(false) // returns `IGridState` object

    パラメーター

    • serialize: boolean = true
    • Optional features: (keyof IGridStateOptions) | (keyof IGridStateOptions)[]

    返却 string | IGridState

  • 引数として渡されたI GridState オブジェクトに基づいてグリッド機能の状態を復元します。

    返却

    <igx-grid [igxGridState]="options"></igx-grid>
    
    @ViewChild(IgxGridStateDirective, { static: true }) public state;
    this.state.setState(gridState);

    パラメーター

    • state: string | IGridState
    • Optional features: (keyof IGridStateOptions) | (keyof IGridStateOptions)[]

    返却 void