Skip to content

Commit bf78e79

Browse files
committedApr 16, 2020
feat(troika-3d-ui): allow overriding DatSelect dropdown styles/config
1 parent eca5f15 commit bf78e79

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

Diff for: ‎packages/troika-3d-ui/src/facade/dat-gui/DatSelectFacade.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ class DatSelectFacade extends PopupOwner {
88
constructor(parent) {
99
super(parent)
1010
this.position = 'relative'
11+
this.dropdownConfig = null
1112

1213
this._onItemClick = e => {
1314
this.onUpdate(e.target.value)
@@ -114,7 +115,7 @@ class DatSelectFacade extends PopupOwner {
114115
}, [])
115116

116117
this._btnChild.children[0] = currentOption ? currentOption.label : '[Select...]'
117-
118+
Object.assign(this.popupContent, this.dropdownConfig)
118119
this._menuListDef.data = options
119120

120121
super.afterUpdate()

0 commit comments

Comments
 (0)