Fix linting
This commit is contained in:
parent
e6a66b6006
commit
bfe63d7a88
1 changed files with 4 additions and 4 deletions
|
@ -218,14 +218,14 @@ TouchBar.TouchBarSegmentedControl = class TouchBarSegmentedControl extends Touch
|
||||||
if (config == null) config = {}
|
if (config == null) config = {}
|
||||||
const {segmentStyle, segments, selectedIndex, change} = config
|
const {segmentStyle, segments, selectedIndex, change} = config
|
||||||
this.type = 'segmented_control'
|
this.type = 'segmented_control'
|
||||||
this._addLiveProperty('segmentStyle', segmentStyle);
|
this._addLiveProperty('segmentStyle', segmentStyle)
|
||||||
this._addLiveProperty('segments', segments || []);
|
this._addLiveProperty('segments', segments || [])
|
||||||
this._addLiveProperty('selectedIndex', selectedIndex)
|
this._addLiveProperty('selectedIndex', selectedIndex)
|
||||||
|
|
||||||
if (typeof change === 'function') {
|
if (typeof change === 'function') {
|
||||||
this.onInteraction = (details) => {
|
this.onInteraction = (details) => {
|
||||||
this._selectedIndex = details.selectedIndex;
|
this._selectedIndex = details.selectedIndex
|
||||||
change(details.selectedIndex);
|
change(details.selectedIndex)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue