@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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateLookup.d.ts","sourceRoot":"","sources":["../../../src/dateLookup/DateLookup.js"],"names":[],"mappings":";AAqBA;IAoBE;;;;;;aAqBC;IApCD,wBAaC;IAjBD,wCAAsB;IAEtB,yCAAuB;IAIrB;;;;;;;;;;MAUC;IA0BH,6CAMC;IAFC,uCAAyE;IAI3E,6BAGC;IAED,iBAOE;IAEF,kBAME;IAEF,oCA2CE;IAEF,wEAmBE;IAEF,+DAOE;IAEF,gCAIE;IAEF,yBAA+C;IAE/C,2BAAmD;IAEnD,0BAAiD;IAEjD,sDAME;IAEF;;;eAEE;IAEF,+CA8BE;IAEF,wBAGE;IAEF,sCA0BC;CACF"}
|
|
1
|
+
{"version":3,"file":"DateLookup.d.ts","sourceRoot":"","sources":["../../../src/dateLookup/DateLookup.js"],"names":[],"mappings":";AAqBA;IAoBE;;;;;;aAqBC;IApCD,wBAaC;IAjBD,wCAAsB;IAEtB,yCAAuB;IAIrB;;;;;;;;;;MAUC;IA0BH,6CAMC;IAFC,uCAAyE;IAI3E,6BAGC;IAED,iBAOE;IAEF,oBAME;IAEF,kBAME;IAEF,oCA2CE;IAEF,wEAmBE;IAEF,+DAOE;IAEF,gCAIE;IAEF,yBAA+C;IAE/C,2BAAmD;IAEnD,0BAAiD;IAEjD,sDAME;IAEF;;;eAEE;IAEF,+CA8BE;IAEF,wBAGE;IAEF,sCA0BC;CACF"}
|
package/package.json
CHANGED
|
@@ -84,6 +84,14 @@ class DateLookup extends PureComponent {
|
|
|
84
84
|
}
|
|
85
85
|
};
|
|
86
86
|
|
|
87
|
+
discard = () => {
|
|
88
|
+
const { originalDate } = this.state;
|
|
89
|
+
if (originalDate !== null) {
|
|
90
|
+
this.props.onChange(originalDate);
|
|
91
|
+
}
|
|
92
|
+
this.close();
|
|
93
|
+
};
|
|
94
|
+
|
|
87
95
|
close = () => {
|
|
88
96
|
const { onBlur } = this.props;
|
|
89
97
|
this.setState({ open: false });
|
|
@@ -248,7 +256,7 @@ class DateLookup extends PureComponent {
|
|
|
248
256
|
open={open}
|
|
249
257
|
className="tw-date-lookup-menu"
|
|
250
258
|
position={Position.BOTTOM}
|
|
251
|
-
onClose={this.
|
|
259
|
+
onClose={this.discard}
|
|
252
260
|
>
|
|
253
261
|
{this.getCalendar()}
|
|
254
262
|
</ResponsivePanel>
|