Refresh/Re-render traits of all components in canvas
Question
Is there a way to re-render or refresh traits (which are customs, not built-in traits) of all the components existing whithin the canvas?
Answers (2)
editor.on('component:selected', component => {
component.set({
traits: ['name', 'placeholder']
})
})
mmm what is the point? Your custom traits should already react to component changes (if you created them properly).
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2193
[QUESTION] Reset trait on edit the content of a custom component
Hi, I have a custom component which content can be changed by switching trait select options, but also can be edited similar to the text co...
Issue #3541
[QUESTION] What is the idiomatic way to append and remove classes from components?
Hey there 👋 Love the editor! We're using traits to modify what classes a component has, but that feels a bit hacky as you have to redeclar...
Issue #1368
Resize canvas
Is there a way to have a dynamic resizing of the canvas? i.e not using the Device Manager, but having a drag and drop of the width, similar...
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...
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.