Allow disable specific options

This commit is contained in:
Adria Navarro 2024-05-30 10:55:25 +02:00
parent 896c262c94
commit 1dd5c67392
2 changed files with 2 additions and 3 deletions

View File

@ -92,7 +92,7 @@
<ToggleActionButtonGroup <ToggleActionButtonGroup
disabled disabled
value={PERMISSION_OPTIONS.WRITABLE} value={PERMISSION_OPTIONS.WRITABLE}
{options} options={options.map(o => ({ ...o, disabled: true }))}
/> />
{/if} {/if}
{#each $columns as column} {#each $columns as column}

View File

@ -7,7 +7,6 @@
export let value export let value
export let options export let options
export let disabled
</script> </script>
<div class="permissionPicker"> <div class="permissionPicker">
@ -15,7 +14,7 @@
<AbsTooltip text={option.tooltip} type={TooltipType.Info}> <AbsTooltip text={option.tooltip} type={TooltipType.Info}>
<ActionButton <ActionButton
on:click={() => dispatch("click", option.value)} on:click={() => dispatch("click", option.value)}
{disabled} disabled={option.disabled}
size="S" size="S"
icon={option.icon} icon={option.icon}
quiet quiet