Issue #1324Opened July 27, 2018by jvillena1 reactions

Remove attributes from a component

Question

Hi @artf I don't know if it is possible to remove an attribute from a component. In our project I'm injecting a custom attribute from a custom trait that I created but there is an option to unselect this attribute so I would like to remove from the component.

I couldn't find the functionality on your code.

Thanks in advance

Answers (3)

artfJuly 27, 20181 reactions
const attr = component.getAttributes();
delete attr.title;
component.setAttributes(attr);
alemencionesJune 22, 20190 reactions

@artf hi man!, can you say me some alternative to remove attributes?

lock[bot]June 25, 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.