Added widget property filters, and filtered general from modal widget (#3596)

This commit is contained in:
Nathan Bisson 2022-07-25 06:34:44 -04:00 committed by GitHub
parent ebd597f8fe
commit c8685e92fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,6 +53,14 @@ export const baseComponentProperties = (
validations,
darkMode
) => {
// Add widget title to section key to filter that property section from specified widgets' settings
const accordionFilters = {
Properties: [],
Events: [],
Validation: [],
General: ['Modal'],
Layout: [],
};
let items = [];
if (properties.length > 0) {
items.push({
@ -159,5 +167,7 @@ export const baseComponentProperties = (
),
});
return items;
return items.filter(
(item) => !(item.title in accordionFilters && accordionFilters[item.title].includes(componentMeta.component))
);
};