How to add data to traits correctly? #4120
Unanswered
mosh-tudor
asked this question in
Q&A
Replies: 1 comment
-
The trait reflects the component property or attribute value. attributes: { myattr: 'myattr default value' },
myprop: 'myprop default value',
traits: [
{
name: 'myattr',
label: 'My attribute',
},
{
name: 'myprop',
label: 'My property',
changeProp: true, // <- connect to props
},
], traits can be updated in this way: component.addAttributes({ myattr: 'New myattr value' });
component.set({ myprop: 'New myprop value' }); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Let's imagine that we:
What would be the correct way to do this?
Beta Was this translation helpful? Give feedback.
All reactions