Skip to content

Commit

Permalink
Remove add field button from readonly project (#738)
Browse files Browse the repository at this point in the history
  • Loading branch information
Acylation authored Dec 10, 2023
1 parent 74305a4 commit 4bb2297
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/ui/views/Table/TableView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -280,17 +280,19 @@
});
}}
/>
<span
tabindex="-1"
bind:this={buttonEl}
on:click={handleColumnAppend}
on:keydown={(evt) => {
if (evt.key === "Enter") handleColumnAppend();
}}
>
<Icon name="plus" />
<TextLabel value={$i18n.t("components.data-grid.column.add")} />
</span>
{#if !readonly}
<span
tabindex="-1"
bind:this={buttonEl}
on:click={handleColumnAppend}
on:keydown={(evt) => {
if (evt.key === "Enter") handleColumnAppend();
}}
>
<Icon name="plus" />
<TextLabel value={$i18n.t("components.data-grid.column.add")} />
</span>
{/if}
</div>
</ViewContent>
</ViewLayout>
Expand Down

0 comments on commit 4bb2297

Please sign in to comment.