for the most part switched out the grid's internals for the new table component
This commit is contained in:
parent
6d74950495
commit
d219ae1f9a
8 changed files with 151 additions and 218 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue