mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-11 18:32:20 +08:00
fix(search-bar): Apparently we were not providing keys
This commit is contained in:
parent
f85f447141
commit
1b6525910c
2 changed files with 8 additions and 6 deletions
|
@ -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}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
@ -250,11 +250,13 @@ class Menu extends React.Component
|
|||
event.preventDefault()
|
||||
@props.onSelect(item) if @props.onSelect
|
||||
|
||||
<MenuItem onMouseDown={onMouseDown}
|
||||
key={@props.itemKey(item)}
|
||||
checked={@props.itemChecked?(item)}
|
||||
content={content}
|
||||
selected={@state.selectedIndex is i} />
|
||||
<MenuItem
|
||||
onMouseDown={onMouseDown}
|
||||
key={@props.itemKey(item)}
|
||||
checked={@props.itemChecked?(item)}
|
||||
content={content}
|
||||
selected={@state.selectedIndex is i}
|
||||
/>
|
||||
|
||||
_onShiftSelectedIndex: (delta) =>
|
||||
return if @props.items.length is 0
|
||||
|
|
Loading…
Reference in a new issue