Closed ghost closed 4 years ago
There is no setter of labelRef. So labelRef is always undefined, and cannot executive this code:
undefined
protected updateSelection() { ... const selectedIndex = this.MDComponent.selectedIndex; if (selectedIndex === 0) { if (this.labelRef) { this.labelRef.classList.remove('mdc-floating-label--float-above'); } } else { if (this.labelRef) { this.labelRef.classList.add('mdc-floating-label--float-above'); } } } }
So I fix it!
before:
after:
There is no setter of labelRef. So labelRef is always
undefined
, and cannot executive this code:So I fix it!
before:![image](https://user-images.githubusercontent.com/20078201/71460893-0902c700-27f1-11ea-8d8f-8952eb8f5c3a.png)
after:![image](https://user-images.githubusercontent.com/20078201/71460926-35b6de80-27f1-11ea-8b4f-c2bf369028cc.png)