Issue #631💬 AnsweredOpened December 12, 2017by z1lk1 reactions

How to refresh Classes view for active Component in the Style Manager

Quick answerby z1lk1

Ah. The ClassTagsView (classes section of the style manager) updates the selector list on the event "change:selectedComponent" on the editor model. https://github.com/artf/grapesjs/blob/66c19dae4ff5536a34b9ea73d3614fc76752a77c/src/selector_manager/view/ClassTagsView.js#L54 Fixed my problem by adding the following to t...

Read full answer below ↓

Question

I'm using a trait (type=select) to change the class of a component (a "column" component, so classes representing width 1-12). After I have removed previous col-* classes and added the newly selected one (via a function triggered by the select change), the Classes section of the Style Manager still has the old class. If I select a different component, then select the column again, it has the new, correct class. How do I force a refresh on the style manager without de/reselecting the component? Perhaps I am adding/removing classes incorrectly, if the Style Manager view should update automatica...

Answers (2)

z1lkDecember 13, 2017

Ah. The ClassTagsView (classes section of the style manager) updates the selector list on the event "change:selectedComponent" on the editor model. https://github.com/artf/grapesjs/blob/66c19dae4ff5536a34b9ea73d3614fc76752a77c/src/selector_manager/view/ClassTagsView.js#L54 Fixed my problem by addin...

lock[bot]September 18, 2019

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.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.