From 36559c5891cc8ee21ae109057ab0147aea36da10 Mon Sep 17 00:00:00 2001 From: Wojciech Maj Date: Sat, 9 Oct 2021 08:25:52 +0200 Subject: [PATCH] Fix crash after make-event-props update --- sample/yarn.lock | 6 +++--- src/DateTimePicker.jsx | 9 ++++++--- test/yarn.lock | 6 +++--- yarn.lock | 6 +++--- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/sample/yarn.lock b/sample/yarn.lock index 392c3def..eb76b9b9 100644 --- a/sample/yarn.lock +++ b/sample/yarn.lock @@ -3890,9 +3890,9 @@ fsevents@~2.3.2: linkType: hard "make-event-props@npm:^1.1.0": - version: 1.2.0 - resolution: "make-event-props@npm:1.2.0" - checksum: 3fe45b1d01ddda97b3a9621f7475fb8dbad6e4d4336b8bed2d7a05f89592f6f86e3dc1cefa1b0ccaad38e4315fb57fbb31b3b44a5349ab63d777ea06d4fc65b6 + version: 1.3.0 + resolution: "make-event-props@npm:1.3.0" + checksum: 92b8845f63a25fc7da80ed2a5cc5055fba30066b83ad88e4f8c090cd99ae53a13297156df0bd0487d340507994362deaed5580266f73dfe142dc46163b5b8a6a languageName: node linkType: hard diff --git a/src/DateTimePicker.jsx b/src/DateTimePicker.jsx index 4d4ccf97..b4b188f5 100644 --- a/src/DateTimePicker.jsx +++ b/src/DateTimePicker.jsx @@ -375,18 +375,21 @@ export default class DateTimePicker extends PureComponent { } render() { + const { eventProps } = this; const { className, disabled } = this.props; - const { isCalendarOpen, isClockOpen } = this.state; + const { isOpen } = this.state; + + const { onChange, ...eventPropsWithoutOnChange } = eventProps; return (
{ if (!ref) { diff --git a/test/yarn.lock b/test/yarn.lock index 3dd84d88..895088a4 100644 --- a/test/yarn.lock +++ b/test/yarn.lock @@ -4438,9 +4438,9 @@ fsevents@~2.3.2: linkType: hard "make-event-props@npm:^1.1.0": - version: 1.2.0 - resolution: "make-event-props@npm:1.2.0" - checksum: 3fe45b1d01ddda97b3a9621f7475fb8dbad6e4d4336b8bed2d7a05f89592f6f86e3dc1cefa1b0ccaad38e4315fb57fbb31b3b44a5349ab63d777ea06d4fc65b6 + version: 1.3.0 + resolution: "make-event-props@npm:1.3.0" + checksum: 92b8845f63a25fc7da80ed2a5cc5055fba30066b83ad88e4f8c090cd99ae53a13297156df0bd0487d340507994362deaed5580266f73dfe142dc46163b5b8a6a languageName: node linkType: hard diff --git a/yarn.lock b/yarn.lock index c6f7a5af..7a7672a6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5085,9 +5085,9 @@ __metadata: linkType: hard "make-event-props@npm:^1.1.0": - version: 1.2.0 - resolution: "make-event-props@npm:1.2.0" - checksum: 3fe45b1d01ddda97b3a9621f7475fb8dbad6e4d4336b8bed2d7a05f89592f6f86e3dc1cefa1b0ccaad38e4315fb57fbb31b3b44a5349ab63d777ea06d4fc65b6 + version: 1.3.0 + resolution: "make-event-props@npm:1.3.0" + checksum: 92b8845f63a25fc7da80ed2a5cc5055fba30066b83ad88e4f8c090cd99ae53a13297156df0bd0487d340507994362deaed5580266f73dfe142dc46163b5b8a6a languageName: node linkType: hard