fix selection command
This commit is contained in:
parent
ce7a300f48
commit
96d04a6094
3 changed files with 11 additions and 4 deletions
|
@ -11,7 +11,8 @@ export interface GridApi {
|
|||
readonly selection: Accessor<SelectionItem<number, Entry>[]>;
|
||||
remove(indices: number[]): void;
|
||||
addKey(key: string): void;
|
||||
// addLocale(locale: string): void;
|
||||
selectAll(): void;
|
||||
clearSelection(): void;
|
||||
};
|
||||
|
||||
const groupBy = (rows: DataSetRowNode<number, Entry>[]) => {
|
||||
|
@ -68,6 +69,12 @@ export function Grid(props: { class?: string, rows: Entry[], locales: string[],
|
|||
addKey(key) {
|
||||
r.insert({ key, ...Object.fromEntries(locales().map(l => [l, ''])) });
|
||||
},
|
||||
selectAll() {
|
||||
api()?.selectAll();
|
||||
},
|
||||
clearSelection() {
|
||||
api()?.clearSelection();
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue