Auto-update for added/deleted spools in client

This commit is contained in:
Donkie
2023-10-15 21:05:42 +02:00
parent aa28bd1f19
commit f7faa6ccdc
2 changed files with 19 additions and 8 deletions

View File

@@ -148,6 +148,16 @@ export const SpoolList: React.FC<IResourceComponentsProps> = () => {
mode: "server",
initial: initialState.filters,
},
liveMode: "manual",
onLiveEvent(event) {
if (event.type === "created" || event.type === "deleted") {
// updated is handled by the liveify
invalidate({
resource: "spool",
invalidates: ["list"],
});
}
},
});
// Create state for the columns to show