Add context menu
This commit is contained in:
parent
70075b976f
commit
a28310d303
|
@ -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>
|
|
@ -3,6 +3,7 @@
|
||||||
import { oauth2 } from "@/stores/builder"
|
import { oauth2 } from "@/stores/builder"
|
||||||
import AddButton from "./AddButton.svelte"
|
import AddButton from "./AddButton.svelte"
|
||||||
import { onMount } from "svelte"
|
import { onMount } from "svelte"
|
||||||
|
import MoreMenuRenderer from "./MoreMenuRenderer.svelte"
|
||||||
|
|
||||||
const schema = {
|
const schema = {
|
||||||
name: {
|
name: {
|
||||||
|
@ -12,7 +13,12 @@
|
||||||
displayName: "Last used",
|
displayName: "Last used",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
},
|
},
|
||||||
|
more: {
|
||||||
|
width: "auto",
|
||||||
|
displayName: "",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
const customRenderers = [{ column: "more", component: MoreMenuRenderer }]
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
oauth2.fetch()
|
oauth2.fetch()
|
||||||
|
@ -41,6 +47,8 @@
|
||||||
data={configs}
|
data={configs}
|
||||||
loading={$oauth2.loading}
|
loading={$oauth2.loading}
|
||||||
{schema}
|
{schema}
|
||||||
|
{customRenderers}
|
||||||
|
allowEditRows={false}
|
||||||
allowEditColumns={false}
|
allowEditColumns={false}
|
||||||
allowClickRows={false}
|
allowClickRows={false}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue