HansSchouten / PHPageBuilder

A drag and drop page builder to manage pages in any PHP project
https://www.phpagebuilder.com
MIT License
739 stars 180 forks source link

add default collapsed category #42

Closed dsultanr closed 3 years ago

dsultanr commented 3 years ago

is it possible to add any option into config.php of the block to prevent auto-expand the category of the block (not to add gjs-open class)?

HansSchouten commented 3 years ago

Yes this is possible, I will soon add this option.

HansSchouten commented 3 years ago

I just found out to my surprise that there is no option for that in GrapesJS. This seems to be the only way, but we cannot easily pass preferences to sidebar for performing this after page load. Also to be able to prevent auto expand in a block config is a bit unclear, since you have multiple blocks in a category.

For now I have added an improvement that on searching for blocks, categories without matches will be automatically hidden. Hopefully this helps as well.

dsultanr commented 3 years ago

sad, thanks