From 434712590197ae104c09e5463aaecaf40f89201c Mon Sep 17 00:00:00 2001 From: Mohammed Erraysy Date: Tue, 12 Dec 2017 14:13:59 +0000 Subject: [PATCH 1/2] Add onEscKeyDown and onOverlayClick fallbacks --- components/time_picker/TimePicker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/time_picker/TimePicker.js b/components/time_picker/TimePicker.js index 723ca206..1ed7dde4 100644 --- a/components/time_picker/TimePicker.js +++ b/components/time_picker/TimePicker.js @@ -117,8 +117,8 @@ const factory = (TimePickerDialog, Input) => { name={this.props.name} okLabel={okLabel} onDismiss={this.handleDismiss} - onEscKeyDown={onEscKeyDown} - onOverlayClick={onOverlayClick} + onEscKeyDown={onEscKeyDown || this.handleDismiss} + onOverlayClick={onOverlayClick || this.handleDismiss} onSelect={this.handleSelect} theme={this.props.theme} value={this.props.value} From 286c3f792eeb0973b74a1f4cf3641b482064bdea Mon Sep 17 00:00:00 2001 From: Mohammed Erraysy Date: Mon, 26 Feb 2018 17:29:58 +0000 Subject: [PATCH 2/2] Revert "Fix arrows updating issue when children change" This reverts commit 3d42ef975f3082b4e14ccf7136191650e5551b90. --- components/tabs/Tabs.js | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/components/tabs/Tabs.js b/components/tabs/Tabs.js index 6d5fb4d2..603c6799 100644 --- a/components/tabs/Tabs.js +++ b/components/tabs/Tabs.js @@ -59,8 +59,6 @@ const factory = (Tab, TabContent, FontIcon) => { if (index !== prevIndex || children !== prevChildren) { this.updatePointer(index); } - - this.updateArrows(); } componentWillUnmount() { @@ -107,18 +105,13 @@ const factory = (Tab, TabContent, FontIcon) => { const scrollLeft = this.navigationNode.scrollLeft; const nav = this.navigationNode.getBoundingClientRect(); const lastLabel = this.navigationNode.children[idx].getBoundingClientRect(); - const left = scrollLeft > 0; - const right = nav.right < (lastLabel.right - 5); - const { left: prevLeft, right: prevRight } = this.state.arrows; - if (left !== prevLeft || right !== prevRight) { - this.setState({ - arrows: { - left, - right, - }, - }); - } + this.setState({ + arrows: { + left: scrollLeft > 0, + right: nav.right < (lastLabel.right - 5), + }, + }); } }