Add mode prop to segmented touch bar control

This commit is contained in:
Samuel Attard 2017-04-28 14:50:58 +10:00
parent 79b02ca71e
commit 225ccab3d2
No known key found for this signature in database
GPG key ID: E89DDE5742D58C4E
2 changed files with 11 additions and 1 deletions

View file

@ -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) => {