QUESTION: Is there a way to listen to class name changes
Question
I have created a added a component to the "view". I want to show this component only in view (and not add to model/html thus added to the view).
I would like to pass any "class" assignments or changes to this component. For this, I need to listen to a event for any class assignments. Is this possible?
Answers (1)
I figured it out -- using "update" local hook
_**updated(property: any, value: any, prevValue: any) {
for (let i = 0; i < value.models.length; i++) {
log.debug('$$$$ :', value.models[i].attributes.name);
}
},**_
I am using " value.models[i].attributes.name" -- is there a better way such as "getClasses" function or something like this?Related Questions and Answers
Continue research with similar issue discussions.
Issue #2404
Question: how to observe children changes in component
Is there an easy way to subscribe/listen to changes in the components/children of my custom component type? Perhaps an event I can subscrib...
Issue #2097
New views question
Hello all, Is there is any simple way to add a new view right next to the style manager? I would like to create a new view that will show s...
Issue #1639
[Question]: Would it be possible to have change settings under style manager in a way that it has href when a link is created?
I'm using preset newsletter with built-in RTE (do not want to use ck editor like the demo) In order to make any text to link, i need to cli...
Issue #1962
[QUESTION] any other way to listen the traits option changes
HI, I added the code of listening to the changes made when the user selects the values in the dropdown. but I need to listen to the changes...
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.