Cannot strip data-test-* attribute when binding the attribute to differently named property
tigressbailey opened this issue · 4 comments
tigressbailey commented
For instance, we add below snippet in a component
attributeBindings: ['testAttr:data-test-selector'],
testAttr: computed('dataAttrPrefix', {
get() {
const prefix = get(this, 'prefix');
return `${prefix}_my_selector`;
}
}).readOnly()
In prod env, the 'data-test-selector' still exists.
Turbo87 commented
try this instead:
'data-test-selector': computed('dataAttrPrefix', {
get() {
const prefix = get(this, 'prefix');
return `${prefix}_my_selector`;
}
}).readOnly()
tigressbailey commented
@Turbo87 Thanks for the prompt reply.
I was wondering if the strip feature would also support the differently named property.
Turbo87 commented
no, we only strip properties that start with data-test-
tigressbailey commented
@Turbo87 Fair enough.