for the most part switched out the grid's internals for the new table component

This commit is contained in:
Chris Kruining 2024-12-11 16:24:54 +01:00
parent 6d74950495
commit d219ae1f9a
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
8 changed files with 151 additions and 218 deletions

View file

@ -53,7 +53,7 @@ interface State {
data: { key: string, value: Accessor<any>, element: WeakRef<HTMLElement> }[];
}
export const SelectionProvider: ParentComponent<{ selection?: SelectionHandler, multiSelect?: true }> = (props) => {
export const SelectionProvider: ParentComponent<{ selection?: SelectionHandler, multiSelect?: boolean }> = (props) => {
const [state, setState] = createStore<State>({ selection: [], data: [] });
const selection = createMemo(() => state.data.filter(({ key }) => state.selection.includes(key)));
const length = createMemo(() => state.data.length);