Traits values are not saved if I'm not typing on them
Thanks @artf that solved my problem in a simple solution so then I don't run over all inputs to update only one. Great jobs!
Read full answer below βQuestion
Hi @artf, I'm struggling with an issue when I'm trying to insert values in the Traits parameters. If I insert a new value without typing on it then the value is gone after the component is deselected. If you check the video attached maybe it's clearer.
I need to know if there is a way to update the model with the new value inserted on traits parameters.
Answers (3)
Thanks @artf that solved my problem in a simple solution so then I don't run over all inputs to update only one.
Great jobs!
You are changing the title attribute of the element. so the value will not be updated. Can you post your trait creation code.
Hi @mcsekar12, it happens with all the elements not only with the title. I'm not creating a traits, I only included when the component is selected a special button to allow user to include variables in the inputs. So I would like to know why the event is not triggering as when I'm typing on it.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1092
Traits and storage trigger
Hey, maybe it's not bug, i'm not sure. I have traits with changeProp: true field. When I change the value of trait by UI, model is changed...
Issue #2645
How to add new content to the intended component without removing the previously added component content
WARNING READ and FOLLOW next 5 steps, then REMOVE them before posting the issueFollow CONTRIBUTING Guidelines https://github.com/artf/grape...
Issue #2547
Unable to drag an element if style has bottom or right values
Hi @artf , If any component CSS has bottom or right values , not able to drag them. Values are generating as NaN. Attached the screenshot f...
Issue #1629
Grapesjs- When i drag and drop the video into the canvas, i want it to be selected on Component Setting right away
WARNING READ and FOLLOW next 5 steps, then REMOVE them before posting the issueFollow CONTRIBUTING Guidelines https://github.com/artf/grape...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins β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.
Tutorial
GrapesJS DevTools: A Developer Panel Inside Your Editor
If you've ever debugged GrapesJS with console.log(editor.getSelected()) and a dozen throwaway event listeners β this post is for you.
Tutorial
How We Built Composeit in Record Time Using GrapesJS Shadcn
Bypass foundational builder boilerplate and focus on what truly matters.
Tutorial
GrapesJS custom components guide (2026)
Define custom GrapesJS components with DomComponents.addType: detection with isComponent, a model with traits and defaults, and a view for canvas behavior.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.