Issue #1313Opened July 24, 2018by krunal0390 reactions

[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.

image

Answers (2)

artfJuly 26, 20180 reactions

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

lock[bot]September 17, 20190 reactions

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...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.