mirror of
https://github.com/portainer/portainer.git
synced 2025-07-21 06:19:41 +02:00
feat(helm): auto refresh helm resources [r8s-298] (#672)
This commit is contained in:
parent
9a9373dd0f
commit
61d6ac035d
10 changed files with 120 additions and 50 deletions
|
@ -9,10 +9,9 @@ import {
|
|||
|
||||
import { Datatable, defaultGlobalFilterFn, Props } from './Datatable';
|
||||
import {
|
||||
BasicTableSettings,
|
||||
createPersistedStore,
|
||||
refreshableSettings,
|
||||
RefreshableTableSettings,
|
||||
TableSettingsWithRefreshable,
|
||||
} from './types';
|
||||
import { useTableState } from './useTableState';
|
||||
|
||||
|
@ -30,13 +29,14 @@ const mockColumns = [
|
|||
];
|
||||
|
||||
// mock table settings / state
|
||||
export interface TableSettings
|
||||
extends BasicTableSettings,
|
||||
RefreshableTableSettings {}
|
||||
function createStore(storageKey: string) {
|
||||
return createPersistedStore<TableSettings>(storageKey, 'name', (set) => ({
|
||||
...refreshableSettings(set),
|
||||
}));
|
||||
return createPersistedStore<TableSettingsWithRefreshable>(
|
||||
storageKey,
|
||||
'name',
|
||||
(set) => ({
|
||||
...refreshableSettings(set),
|
||||
})
|
||||
);
|
||||
}
|
||||
const storageKey = 'test-table';
|
||||
const settingsStore = createStore(storageKey);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue