Issue #1679Opened December 23, 2018by alialrabi0 reactions

How to render component in canvas using trait.

Question

Hi Artf ,Thanks for your great tool,I have created test case for my problem
https://js.do/code/271771 I have created custom tool sidebar and create trait to render component with checkbox updates.

-To reproduce 1-drag sidebar component into canvas (it should print initial fname value in console) 2-open filter menu in classes style manager 3-check checkbox select fname 4-Then I want to render sidebar component in canvas with fname value 5-I would use this value as parameter to use in script after publish the page.

Answers (3)

artfDecember 27, 20180 reactions

In your doStuff method you're only getting the name of the trait, so nothing useful. I think if you change that checkbox trait in a simple input, you'll see the script changing correctly in the export code

alialrabiDecember 27, 20180 reactions

Thanks for your replay, Could you please explain more what should I do?What do you mean by ( change that checkbox trait in a simple input)? I have updated demo to be more clear https://js.do/alialrabi/273238 . There are two checkbox fname and lname ,So need to change the value of myModelPropName to fname or lname ,what ever user select. I set myvalue in dostuff method by myvalue = trait.get('name') ,So myModelPropName value should changed ,but the script still not updated .

lock[bot]January 2, 20200 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.