diff --git a/packages/materialdesign-components/src/Menu/Menu.svelte b/packages/materialdesign-components/src/Menu/Menu.svelte index 4121f41340..b601d38f3e 100644 --- a/packages/materialdesign-components/src/Menu/Menu.svelte +++ b/packages/materialdesign-components/src/Menu/Menu.svelte @@ -45,8 +45,6 @@ } setContext("BBMD:list:context", "menu") }) - - $: menu && _bb.attachChildren(menu) {#if useFixedPosition || useAbsolutePosition} diff --git a/packages/materialdesign-components/src/Test/TestApp.svelte b/packages/materialdesign-components/src/Test/TestApp.svelte index b6c40fa895..63fec32977 100644 --- a/packages/materialdesign-components/src/Test/TestApp.svelte +++ b/packages/materialdesign-components/src/Test/TestApp.svelte @@ -16,6 +16,7 @@ CustomersIndexTable, List, Icon, + Menu, } = props let currentComponent @@ -40,6 +41,7 @@ Datatable, CustomersIndexTable, List, + Menu, ], }, } diff --git a/packages/materialdesign-components/src/Test/props.js b/packages/materialdesign-components/src/Test/props.js index c10cce0161..3503631a86 100644 --- a/packages/materialdesign-components/src/Test/props.js +++ b/packages/materialdesign-components/src/Test/props.js @@ -152,4 +152,27 @@ export const props = { singleSelection: true, onSelect: selected => console.log(selected), }, + Menu: { + _component: "@budibase/materialdesign-components/Menu", + _children: [ + { + _component: "@budibase/materialdesign-components/ListItem", + _children: [], + text: "Settings", + value: 0, + }, + { + _component: "@budibase/materialdesign-components/ListItem", + _children: [], + text: "Account", + value: 1, + }, + { + _component: "@budibase/materialdesign-components/ListItem", + _children: [], + text: "Profile", + value: 2, + }, + ], + } } diff --git a/packages/materialdesign-components/src/index.js b/packages/materialdesign-components/src/index.js index 5dac37d7b6..3517b2ed7e 100644 --- a/packages/materialdesign-components/src/index.js +++ b/packages/materialdesign-components/src/index.js @@ -17,3 +17,4 @@ export { export { default as indexDatatable } from "./Templates/indexDatatable" export { default as recordForm } from "./Templates/recordForm" export { List, ListItem } from "./List" +export {Menu} from "./Menu"