Open vilmosnagy opened 3 years ago
It was reported here as well.
I'd fix this with something like:
connectedCallback() {
super.connectedCallback();
if (!this.initialized) {
for (let i = 0; i < this.barsCount; i++) {
const barElement = document.createElement('div');
barElement.setAttribute('part', 'bar');
this.$.bars.appendChild(barElement);
this.push('_bars', barElement);
}
this.initialized = true;
}
}
Would you merge this PR?
Hi,
If I use this component with the java's
PasswordField
component, the bars are appearing twice (there are 10 bars at the end):(I use the Kotlin DSL to create this UI)
If I debug this correctly, the
connectedCallback()
called twice, see the stacktraces here:One stacktrace:
The other stacktrace: