mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-18 13:44:12 +00:00
8ad260d28a
fix: parsing of custom fields for blocks refactor: extract cuesheet settings refactor: cuesheet actions refactor: improve cuesheet performance on resizing
19 lines
544 B
TypeScript
19 lines
544 B
TypeScript
import { create } from 'zustand';
|
|
|
|
interface VisibleRowsStore {
|
|
visibleRows: Set<string>;
|
|
addVisibleRow: (id: string) => void;
|
|
removeVisibleRow: (id: string) => void;
|
|
}
|
|
|
|
export const useVisibleRowsStore = create<VisibleRowsStore>((set) => ({
|
|
visibleRows: new Set(),
|
|
addVisibleRow: (id) => set((state) => ({ visibleRows: new Set(state.visibleRows).add(id) })),
|
|
removeVisibleRow: (id) =>
|
|
set((state) => {
|
|
const newSet = new Set(state.visibleRows);
|
|
newSet.delete(id);
|
|
return { visibleRows: newSet };
|
|
}),
|
|
}));
|