[Question] Set traits value from html on component load
Question
I have custom component and want to set trait default values from html. below is html rendered by component. traits I am trying to set for are image url, anchor url and h4 content.

Answers (2)
By default, the initial value of the trait corresponds to component's attribute. In the case of changeProp use, you should pass the initial value via data-gjs-* attribute
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 #987
[BUG/Question] Dropdown indicator not displayed for a custom trait
Hello, the dropdown (select) element arrow indicator icon is not rendered when adding a custom trait to a component: I'm using following co...
Issue #1723
[QUESTION] replacing particular text in dropped component
Hi, I get the value from custom traits from what I entered but I don't know how to change the particular value in dropped component and ren...
Issue #1869
[QUESTION] how to add extra field in input traits
Hi, I want to add the new field in default input traits. for example:- i need to add {label: binding, name:binding} in already exist input...
Issue #1297
[QUESTION] Is Multiple trait possible to do editable img and <a> tag in the table component?
Hi Artur, I had forgot to say i am using latest version, i am sorry for that. I want to add a plugin for editable social media icons, image...
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.