some tweaks

This commit is contained in:
Chris Kruining 2024-10-16 16:24:47 +02:00
parent 7db65413be
commit 5851d398d3
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
4 changed files with 26 additions and 64 deletions

View file

@ -117,6 +117,9 @@ export default function Edit(props: ParentProps) {
selectAll: createCommand('select all', () => {
api()?.selectAll();
}, { key: 'a', modifier: Modifier.Control }),
clearSelection: createCommand('clear selection', () => {
api()?.clear();
}),
} as const;
const mutated = createMemo(() => Object.values(api()?.rows() ?? {}).filter(row => Object.values(row).some(lang => lang.original !== lang.value)));
@ -144,6 +147,8 @@ export default function Edit(props: ParentProps) {
<Menu.Item label="selection">
<Menu.Item command={commands.selectAll} />
<Menu.Item command={commands.clearSelection} />
</Menu.Item>
<Menu.Item label="view" command={noop} />