You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/react/kubernetes/datatables/default-kube-datatable-stor...

19 lines
517 B

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),
})
);
}