From cb8d331415418e55b1946bab97d178a494eb0a6b Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Wed, 31 Jan 2018 22:37:03 -0700 Subject: [PATCH] Add 'data' member support to getData() --- core/horizontal_menu_view.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/horizontal_menu_view.js b/core/horizontal_menu_view.js index 02f9c06e..d9921c96 100644 --- a/core/horizontal_menu_view.js +++ b/core/horizontal_menu_view.js @@ -163,5 +163,6 @@ HorizontalMenuView.prototype.onKeyPress = function(ch, key) { }; HorizontalMenuView.prototype.getData = function() { - return this.focusedItemIndex; + const item = this.getItem(this.focusedItemIndex); + return _.isString(item.data) ? item.data : this.focusedItemIndex; }; \ No newline at end of file