Issue #2034Opened May 24, 2019by sdrebel1 reactions

[QUESTIONS] How to remove trait fields dynamically?

Question

Hi @artf ,

I have a drop down with few options. Based on the selection fields are getting generated using addTrait. Similar way is there any removeTrait function?

Ex: If I choose Option1, 'field-1' will be generated. If I choose Option2, 'field-1' should be removed and 'field-2' should be added .

Answers (1)

sdrebelMay 28, 20191 reactions

Found the solutions in the updated dev versions.

component.removeTrait('title');

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.