table data auto refresh

This commit is contained in:
Jan Prochazka
2022-06-30 08:53:01 +02:00
parent 08b7b1870c
commit 179bd1f6b1
3 changed files with 120 additions and 6 deletions

View File

@@ -5,7 +5,16 @@
import ToolStripSplitDropDownButton from './ToolStripSplitDropDownButton.svelte';
export let commands;
$: menu = _.compact(commands).map(command => ({ command }));
export let hideDisabled = false;
export let buttonLabel = null;
$: menu = _.compact(commands).map(command => (_.isString(command) ? { command } : command));
</script>
<ToolStripCommandButton command={commands[0]} component={ToolStripSplitDropDownButton} {menu} />
<ToolStripCommandButton
command={commands[0]}
component={ToolStripSplitDropDownButton}
{menu}
{hideDisabled}
{buttonLabel}
/>