Add mode prop to segmented touch bar control
This commit is contained in:
parent
79b02ca71e
commit
225ccab3d2
2 changed files with 11 additions and 1 deletions
|
@ -264,11 +264,12 @@ TouchBar.TouchBarSegmentedControl = class TouchBarSegmentedControl extends Touch
|
|||
constructor (config) {
|
||||
super()
|
||||
if (config == null) config = {}
|
||||
const {segmentStyle, segments, selectedIndex, change} = config
|
||||
const {segmentStyle, segments, selectedIndex, change, mode} = config
|
||||
this.type = 'segmented_control'
|
||||
this._addLiveProperty('segmentStyle', segmentStyle)
|
||||
this._addLiveProperty('segments', segments || [])
|
||||
this._addLiveProperty('selectedIndex', selectedIndex)
|
||||
this._addLiveProperty('mode', mode)
|
||||
|
||||
if (typeof change === 'function') {
|
||||
this.onInteraction = (details) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue