Choose order and visibility of Categories
Question
Hey @artf , we need to be able to change the categories order and visibility when the application starts.
I was able to do it changing the model in the Category and this piece of code in BlocksView.js:
if (category && this.categories) {
if (typeof category.label == 'string') {
category = {
id: category.label,
label: category.label,
order: category.order,
open: category.open,
};
}
...and setting the order in a flexbox property.
I wanted to know if you think this is a good approach or you have another suggestion.
I'm willing to do a PR.
Thank you!
Answers (2)
I think that change in BlocksView is not necessary (at first look). If you pass the category as an object it will be added as it is with all its properties. If for a change you mean updating the view of the category with an order style (if exists) I'm ok with it
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1047
[BUG] Model not able to change after changing value in custom Select dropdown menu.
Hey, I'm using CDN link for grapes js from unpkg.com In my project, I've used custom trait as a drop-down select menu which changes HTML us...
Issue #1837
How to change the label of traits?
I'd like change the labels of triats which are going to be french. Could you give a piece of example code? Thank you Artur
Issue #1822
[QUESTION] - Add style sector for specific Css rule
Hey @artf , COuld you give your help on this one? I want to disable the user to able to select the wrapper block (body) but I still want to...
Issue #1817
Change HTML content while block is render in editor
Hello @artf I have one block into block manager like As per above script inside the block, i want to add dynamic HTML content while this bl...
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.