From 7d0bcdeb6db55e6a8a732a01eb47b711f8815483 Mon Sep 17 00:00:00 2001 From: DavidQuartz Date: Thu, 16 Dec 2021 11:18:51 +0000 Subject: [PATCH] Added nested dropdown list for burger menu --- .../client/js/components/Menu/DropdownList.jsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/geonode_mapstore_client/client/js/components/Menu/DropdownList.jsx b/geonode_mapstore_client/client/js/components/Menu/DropdownList.jsx index 6e798284b5..2e3ccd34d5 100644 --- a/geonode_mapstore_client/client/js/components/Menu/DropdownList.jsx +++ b/geonode_mapstore_client/client/js/components/Menu/DropdownList.jsx @@ -26,7 +26,16 @@ const itemElement = ({ labelId, href, badge, target }) => ( ); -const itemsList = (items) => ( items && items.map(({ labelId, href, badge, target }) => itemElement({ labelId, href, badge, target }))); +const itemsList = (items) => (items && items.map((item) => { + + const { labelId, href, badge, target, type, Component, className } = item; + + if (type === 'plugin' && Component) { + return (
  • ); + } + + return itemElement({ labelId, href, badge, target }); +} )); /** * DropdownList component