Issue #397šŸ’¬ AnsweredOpened October 9, 2017by HarshOB1 reactions

Change value of Traits on the base of previous Traits.

Quick answerby artfā¤ 1

I meant "I have to add" 😬

Read full answer below ↓

Question

Hello I am using two dropdowns in traits. On the selected value of the First drop down I am going to call an API and set data into another dropdown. I got data on console but that is not loading on the page. I have to refresh the page to view the changes. What should I do to get immediate change on the page? Here is my code: comps.addType('ReUseComponent', { // Define the Model model: defaultModel.extend({ init() { this.listenTo(this, 'change:selectPartial', this.doStuff); this.listenTo(this, 'change:selectID', this.doStuffsecond); }, doStuff() { this.get('traits').each(function(trait) { trai...

Answers (3)

artf• October 11, 2017

I meant "I have to add" 😬

artf• October 10, 2017

Have to add a listener for options change

HarshOB• October 10, 2017

And How can I add a listener for option change?

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

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

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.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.