From b148ea54e222c031b1bc71cc2aad531af303a2b4 Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Mon, 3 Aug 2015 11:38:52 -0700 Subject: [PATCH] fix(multiselect-list): Occasionally, no dataView or handler is defined for MultiselectList Fixes https://sentry.nylas.com/sentry/edgehill/group/1710/ --- src/components/multiselect-list.cjsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/multiselect-list.cjsx b/src/components/multiselect-list.cjsx index b303c6ae3..55a4efb78 100644 --- a/src/components/multiselect-list.cjsx +++ b/src/components/multiselect-list.cjsx @@ -139,6 +139,7 @@ class MultiselectList extends React.Component _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: =>