How to remove a category if no component in it
Question
I build the custom components at runtime based on a dropdown. When user changes the selection of that dropdown, related custom block will be added and non-related block will be removed. all custom blocks are group by different category name.
if all blocks are removed from that category, it will show on the screen.
Is there any way to remove a category? Or somehow make it auto-removed if no blocks within?
Answers (1)
Try to re-render the block manager with a new collection of blocks
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1141
[Question] - How to extend the existing traits and render the changes in canvas?
I am trying to write a plugin to manage all the element properties of Boostrap Blocks. If someone clicks on the button it will show button...
Issue #2027
[QUESTIONS] How to add traits dynamically based on the dropdown selection
Hi @artf , I have a custom component with custom traits. When I select the option from the dropdown, more fields needs to be added based on...
Issue #3258
QUESTION: Prevent/Disable Custom Blocks from being dropped inside other Custom Blocks
Hello, I have a custom component, let's call it a Section Block. I want to prevent the user from dropping Section Blocks inside other Secti...
Issue #2839
[Question] I added one component named template in the blocks but when i try to drag another components inside this template component ,it will be dragged but after saving it removes all the components inside it. How to avoid this?
This is code of template component: I debugged it, so i got that : setComponents method in the dom_components clearing it ...but not gettin...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.