mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-12-26 10:00:50 +08:00
fix(multiselect-list): Occasionally, no dataView or handler is defined for MultiselectList
Fixes https://sentry.nylas.com/sentry/edgehill/group/1710/
This commit is contained in:
parent
17c00c0e54
commit
b148ea54e2
1 changed files with 5 additions and 1 deletions
|
@ -139,6 +139,7 @@ class MultiselectList extends React.Component
|
|||
</div>
|
||||
|
||||
_onClickItem: (item, event) =>
|
||||
return unless @state.handler
|
||||
if event.metaKey
|
||||
@state.handler.onMetaClick(item)
|
||||
else if event.shiftKey
|
||||
|
@ -147,16 +148,19 @@ class MultiselectList extends React.Component
|
|||
@state.handler.onClick(item)
|
||||
|
||||
_onEnter: =>
|
||||
return unless @state.handler
|
||||
@state.handler.onEnter()
|
||||
|
||||
_onSelect: =>
|
||||
return unless @state.handler
|
||||
@state.handler.onSelect()
|
||||
|
||||
_onDeselect: =>
|
||||
return unless @_visible()
|
||||
return unless @_visible() and @state.dataView
|
||||
@state.dataView.selection.clear()
|
||||
|
||||
_onShift: (delta, options = {}) =>
|
||||
return unless @state.handler
|
||||
@state.handler.onShift(delta, options)
|
||||
|
||||
_onChange: =>
|
||||
|
|
Loading…
Reference in a new issue