How to save and restore filter state of datatable
There is an example of saving and restoring state: https://primefaces.org/primereact/datatable/state/
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
yep there is a "datatableRef.current?.reset()` method.
Available methods on Datatable..
Available methods on Datatable..
Code: Select all
public clearState(): void;
public closeEditingCell(): void;
public exportCSV(options?: { selectionOnly: boolean }): void;
public filter<T>(value: T, field: string, mode: DataTableFilterMatchModeType, index?: number): void;
public reset(): void;
public resetColumnOrder(): void;
public resetScroll(): void;
public restoreColumnWidths(): void;
public restoreState(): void;
public restoreTableState(state: any): void;
public saveState(): void;
public getElement(): HTMLDivElement;
public getTable(): HTMLTableElement;
public getVirtualScroller(): VirtualScroller;
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
-
- Information
-
Who is online
Users browsing this forum: No registered users and 18 guests