dropdown: fix label init, make it dynamic prop, refresh it when values are parsed
This commit is contained in:
parent
5b9bcd63ce
commit
7d38418a66
2 changed files with 8 additions and 2 deletions
|
|
@ -83,6 +83,8 @@ class Dropdown extends MenuBase {
|
|||
`)
|
||||
}
|
||||
|
||||
this.setValue(this.value)
|
||||
|
||||
}
|
||||
|
||||
setValue(v,options={}) {
|
||||
|
|
@ -120,7 +122,9 @@ class Dropdown extends MenuBase {
|
|||
this.parseValues()
|
||||
this.setValue(this.value)
|
||||
return
|
||||
|
||||
case 'label':
|
||||
this.setLabel()
|
||||
return
|
||||
}
|
||||
|
||||
return ret
|
||||
|
|
@ -130,7 +134,8 @@ class Dropdown extends MenuBase {
|
|||
}
|
||||
|
||||
Dropdown.dynamicProps = Dropdown.prototype.constructor.dynamicProps.concat(
|
||||
'values'
|
||||
'values',
|
||||
'label'
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue