From 1b6525910c0fa807a0f4463ae1d4dbc052c56f6f Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Wed, 13 Apr 2016 16:08:24 -0700 Subject: [PATCH] fix(search-bar): Apparently we were not providing keys --- internal_packages/thread-search/lib/search-bar.cjsx | 2 +- src/components/menu.cjsx | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/internal_packages/thread-search/lib/search-bar.cjsx b/internal_packages/thread-search/lib/search-bar.cjsx index f9d68c82e..2a7615a38 100644 --- a/internal_packages/thread-search/lib/search-bar.cjsx +++ b/internal_packages/thread-search/lib/search-bar.cjsx @@ -90,7 +90,7 @@ class SearchBar extends React.Component headerComponents={headerComponents} items={@state.suggestions} itemContent={itemContentFunc} - itemKey={ (item) -> item.id ? item.label } + itemKey={ (item) -> item.label || item.contact?.id || item.thread?.id} onSelect={@_onSelectSuggestion} /> diff --git a/src/components/menu.cjsx b/src/components/menu.cjsx index 1291b5558..376a444cc 100644 --- a/src/components/menu.cjsx +++ b/src/components/menu.cjsx @@ -250,11 +250,13 @@ class Menu extends React.Component event.preventDefault() @props.onSelect(item) if @props.onSelect - + _onShiftSelectedIndex: (delta) => return if @props.items.length is 0