Add context menu

This commit is contained in:
Adria Navarro 2025-03-13 13:56:27 +01:00
parent 70075b976f
commit a28310d303
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,11 @@
<script lang="ts">
import { ActionMenu, Icon, MenuItem } from "@budibase/bbui"
</script>
<ActionMenu align="right">
<div slot="control" class="control icon">
<Icon size="S" hoverable name="MoreSmallList" />
</div>
<MenuItem on:click={() => {}} icon="Edit">Edit</MenuItem>
<MenuItem on:click={() => {}} icon="Delete">Delete</MenuItem>
</ActionMenu>

View File

@ -3,6 +3,7 @@
import { oauth2 } from "@/stores/builder"
import AddButton from "./AddButton.svelte"
import { onMount } from "svelte"
import MoreMenuRenderer from "./MoreMenuRenderer.svelte"
const schema = {
name: {
@ -12,7 +13,12 @@
displayName: "Last used",
sortable: false,
},
more: {
width: "auto",
displayName: "",
},
}
const customRenderers = [{ column: "more", component: MoreMenuRenderer }]
onMount(() => {
oauth2.fetch()
@ -41,6 +47,8 @@
data={configs}
loading={$oauth2.loading}
{schema}
{customRenderers}
allowEditRows={false}
allowEditColumns={false}
allowClickRows={false}
/>