mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
18 lines
517 B
TypeScript
18 lines
517 B
TypeScript
import { refreshableSettings, createPersistedStore } from '@@/datatables/types';
|
|
|
|
import { TableSettings } from './DefaultDatatableSettings';
|
|
import { systemResourcesSettings } from './SystemResourcesSettings';
|
|
|
|
export function createStore(
|
|
storageKey: string,
|
|
initialSortBy: string | { id: string; desc: boolean } = 'name'
|
|
) {
|
|
return createPersistedStore<TableSettings>(
|
|
storageKey,
|
|
initialSortBy,
|
|
(set) => ({
|
|
...refreshableSettings(set),
|
|
...systemResourcesSettings(set),
|
|
})
|
|
);
|
|
}
|