Add 'data' member support to getData()

This commit is contained in:
Bryan Ashby 2018-01-31 22:37:03 -07:00
parent ec87d11c31
commit cb8d331415
1 changed files with 2 additions and 1 deletions

View File

@ -163,5 +163,6 @@ HorizontalMenuView.prototype.onKeyPress = function(ch, key) {
}; };
HorizontalMenuView.prototype.getData = function() { HorizontalMenuView.prototype.getData = function() {
return this.focusedItemIndex; const item = this.getItem(this.focusedItemIndex);
return _.isString(item.data) ? item.data : this.focusedItemIndex;
}; };