Added hide logic to widget properties accordian menu item when it contains no items (#3589)

This commit is contained in:
Nathan Bisson 2022-07-25 04:18:51 -04:00 committed by GitHub
parent 6b1625c1b4
commit 2b77414fab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,22 +54,24 @@ export const baseComponentProperties = (
darkMode
) => {
let items = [];
items.push({
title: 'Properties',
children: properties.map((property) =>
renderElement(
component,
componentMeta,
paramUpdated,
dataQueries,
property,
'properties',
currentState,
allComponents,
darkMode
)
),
});
if (properties.length > 0) {
items.push({
title: 'Properties',
children: properties.map((property) =>
renderElement(
component,
componentMeta,
paramUpdated,
dataQueries,
property,
'properties',
currentState,
allComponents,
darkMode
)
),
});
}
if (events.length > 0) {
items.push({