@transferwise/components 0.0.0-experimental-c0c64e3 → 0.0.0-experimental-b71afd5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js
CHANGED
|
@@ -4268,6 +4268,15 @@ class DateLookup extends React.PureComponent {
|
|
|
4268
4268
|
onFocus();
|
|
4269
4269
|
}
|
|
4270
4270
|
};
|
|
4271
|
+
discard = () => {
|
|
4272
|
+
const {
|
|
4273
|
+
originalDate
|
|
4274
|
+
} = this.state;
|
|
4275
|
+
if (originalDate !== null) {
|
|
4276
|
+
this.props.onChange(originalDate);
|
|
4277
|
+
}
|
|
4278
|
+
this.close();
|
|
4279
|
+
};
|
|
4271
4280
|
close = () => {
|
|
4272
4281
|
const {
|
|
4273
4282
|
onBlur
|
|
@@ -4469,7 +4478,7 @@ class DateLookup extends React.PureComponent {
|
|
|
4469
4478
|
open: open,
|
|
4470
4479
|
className: "tw-date-lookup-menu",
|
|
4471
4480
|
position: exports.Position.BOTTOM,
|
|
4472
|
-
onClose: this.
|
|
4481
|
+
onClose: this.discard,
|
|
4473
4482
|
children: this.getCalendar()
|
|
4474
4483
|
})]
|
|
4475
4484
|
});
|