@sheinx/base 3.3.3-beta.7 → 3.3.3-beta.8
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/cjs/date-picker/date-picker.d.ts.map +1 -1
- package/cjs/date-picker/date-picker.js +11 -2
- package/cjs/date-picker/result.d.ts +6 -0
- package/cjs/date-picker/result.d.ts.map +1 -1
- package/cjs/date-picker/result.js +14 -1
- package/esm/date-picker/date-picker.d.ts.map +1 -1
- package/esm/date-picker/date-picker.js +12 -3
- package/esm/date-picker/result.d.ts +6 -0
- package/esm/date-picker/result.d.ts.map +1 -1
- package/esm/date-picker/result.js +14 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["date-picker.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAiB1E,QAAA,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["date-picker.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAiB1E,QAAA,MAAM,UAAU,oFA8Rf,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -59,6 +59,9 @@ var DatePicker = function DatePicker(props0) {
|
|
|
59
59
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
60
60
|
activeIndex = _React$useState2[0],
|
|
61
61
|
setActiveIndex = _React$useState2[1];
|
|
62
|
+
var inputRef = (0, _react.useRef)({
|
|
63
|
+
inputRef: null
|
|
64
|
+
});
|
|
62
65
|
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$datePicker = jssStyle.datePicker) === null || _jssStyle$datePicker === void 0 ? void 0 : _jssStyle$datePicker.call(jssStyle);
|
|
63
66
|
var isRTL = direction === 'rtl';
|
|
64
67
|
var dfp = isRTL ? 'bottom-right' : 'bottom-left';
|
|
@@ -157,6 +160,11 @@ var DatePicker = function DatePicker(props0) {
|
|
|
157
160
|
setFocused(false);
|
|
158
161
|
(_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 || _props$onBlur.call(props, e);
|
|
159
162
|
});
|
|
163
|
+
var handleClose = function handleClose() {
|
|
164
|
+
var _inputRef$current$inp;
|
|
165
|
+
closePop();
|
|
166
|
+
(_inputRef$current$inp = inputRef.current.inputRef) === null || _inputRef$current$inp === void 0 || _inputRef$current$inp.blur();
|
|
167
|
+
};
|
|
160
168
|
var handleResultClick = (0, _hooks.usePersistFn)(function () {
|
|
161
169
|
if (disabledStatus === 'all') return;
|
|
162
170
|
openPop();
|
|
@@ -169,6 +177,7 @@ var DatePicker = function DatePicker(props0) {
|
|
|
169
177
|
activeIndex: activeIndex,
|
|
170
178
|
type: type,
|
|
171
179
|
range: range,
|
|
180
|
+
onRef: inputRef,
|
|
172
181
|
inputable: props.inputable && !props.formatResult,
|
|
173
182
|
disabledLeft: disabledStatus === 'left',
|
|
174
183
|
disabledRight: disabledStatus === 'right',
|
|
@@ -197,7 +206,7 @@ var DatePicker = function DatePicker(props0) {
|
|
|
197
206
|
onKeyDown: function onKeyDown(e) {
|
|
198
207
|
if (e.key === 'Enter') {
|
|
199
208
|
if (open) {
|
|
200
|
-
|
|
209
|
+
handleClose();
|
|
201
210
|
} else {
|
|
202
211
|
openPop();
|
|
203
212
|
}
|
|
@@ -254,7 +263,7 @@ var DatePicker = function DatePicker(props0) {
|
|
|
254
263
|
options: options,
|
|
255
264
|
disabled: disabled,
|
|
256
265
|
jssStyle: jssStyle,
|
|
257
|
-
closePop:
|
|
266
|
+
closePop: handleClose,
|
|
258
267
|
defaultTime: props.defaultTime,
|
|
259
268
|
min: props.min,
|
|
260
269
|
max: props.max,
|
|
@@ -11,6 +11,9 @@ export declare const Input: (props: {
|
|
|
11
11
|
onMouseDown?: ((e: React.MouseEvent) => void) | undefined;
|
|
12
12
|
open?: boolean | undefined;
|
|
13
13
|
disabled?: boolean | undefined;
|
|
14
|
+
inputRef?: React.MutableRefObject<{
|
|
15
|
+
updateValue?: React.Dispatch<React.SetStateAction<string>> | undefined;
|
|
16
|
+
} | undefined> | undefined;
|
|
14
17
|
onPaste?: ((e: React.ClipboardEvent) => void) | undefined;
|
|
15
18
|
onFocus?: ((e: React.FocusEvent) => void) | undefined;
|
|
16
19
|
onBlur?: ((e: React.FocusEvent) => void) | undefined;
|
|
@@ -25,6 +28,9 @@ interface ResultProps extends Pick<DatePickerProps<string>, 'jssStyle' | 'type'
|
|
|
25
28
|
disabledLeft?: boolean;
|
|
26
29
|
disabledRight?: boolean;
|
|
27
30
|
activeIndex?: number;
|
|
31
|
+
onRef: React.MutableRefObject<{
|
|
32
|
+
inputRef: HTMLInputElement | null;
|
|
33
|
+
}>;
|
|
28
34
|
onFocus?: (e: React.FocusEvent) => void;
|
|
29
35
|
onBlur?: (e: React.FocusEvent) => void;
|
|
30
36
|
onClick?: (e?: React.MouseEvent) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["result.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,eAAO,MAAM,KAAK;;WAET,MAAM;;;;kBAIC,MAAM,KAAK,IAAI;mBACf,gBAAgB,KAAK,IAAI;uBACrB,gBAAgB,KAAK,IAAI
|
|
1
|
+
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["result.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,eAAO,MAAM,KAAK;;WAET,MAAM;;;;kBAIC,MAAM,KAAK,IAAI;mBACf,gBAAgB,KAAK,IAAI;uBACrB,gBAAgB,KAAK,IAAI;;;;;;mBAS7B,oBAAoB,KAAK,IAAI;mBAC7B,gBAAgB,KAAK,IAAI;kBAC1B,gBAAgB,KAAK,IAAI;oBACvB,gBAAgB,KAAK,IAAI;iBAyCzC,CAAC;AACF,UAAU,WACR,SAAQ,IAAI,CACV,eAAe,CAAC,MAAM,CAAC,EACvB,UAAU,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,GAAG,aAAa,CAC5D;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,eAAe,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC3C,SAAS,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACrC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,KAAK,CAAC,gBAAgB,CAAC;QAC5B,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAC;KACnC,CAAC,CAAC;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IACxC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;CAC1C;AACD,QAAA,MAAM,MAAM,UAAW,WAAW,gBA0JjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -23,6 +23,14 @@ var Input = exports.Input = function Input(props) {
|
|
|
23
23
|
_useState2 = _slicedToArray(_useState, 2),
|
|
24
24
|
value = _useState2[0],
|
|
25
25
|
setValue = _useState2[1];
|
|
26
|
+
var updateValue = function updateValue() {
|
|
27
|
+
setValue(props.value);
|
|
28
|
+
};
|
|
29
|
+
if (props.inputRef) {
|
|
30
|
+
props.inputRef.current = {
|
|
31
|
+
updateValue: updateValue
|
|
32
|
+
};
|
|
33
|
+
}
|
|
26
34
|
(0, _react.useEffect)(function () {
|
|
27
35
|
setValue(props.value);
|
|
28
36
|
}, [props.value, props.open]);
|
|
@@ -61,6 +69,7 @@ var Result = function Result(props) {
|
|
|
61
69
|
range = props.range,
|
|
62
70
|
placeholder = props.placeholder,
|
|
63
71
|
_onChange = props.onChange,
|
|
72
|
+
_onRef = props.onRef,
|
|
64
73
|
disabledLeft = props.disabledLeft,
|
|
65
74
|
disabledRight = props.disabledRight,
|
|
66
75
|
_props$activeIndex = props.activeIndex,
|
|
@@ -74,6 +83,7 @@ var Result = function Result(props) {
|
|
|
74
83
|
clickIndex: 0
|
|
75
84
|
}),
|
|
76
85
|
context = _useRef.current;
|
|
86
|
+
var inputRef = (0, _react.useRef)({});
|
|
77
87
|
(0, _react.useEffect)(function () {
|
|
78
88
|
if (open) {
|
|
79
89
|
if (context.inputRefs[activeIndex]) {
|
|
@@ -126,10 +136,12 @@ var Result = function Result(props) {
|
|
|
126
136
|
className: styles === null || styles === void 0 ? void 0 : styles.resultTextPadding,
|
|
127
137
|
children: info.inputable ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Input, {
|
|
128
138
|
onRef: function onRef(el) {
|
|
139
|
+
_onRef.current.inputRef = el;
|
|
129
140
|
context.inputRefs[info.index] = el;
|
|
130
141
|
},
|
|
131
142
|
disabled: dis,
|
|
132
143
|
open: !!open,
|
|
144
|
+
inputRef: inputRef,
|
|
133
145
|
value: info.target || info.value || '',
|
|
134
146
|
placeholder: info.place,
|
|
135
147
|
onChange: function onChange(s) {
|
|
@@ -139,10 +151,11 @@ var Result = function Result(props) {
|
|
|
139
151
|
context.clickIndex = info.index;
|
|
140
152
|
},
|
|
141
153
|
onBlur: function onBlur(e) {
|
|
142
|
-
var _props$onBlur;
|
|
154
|
+
var _props$onBlur, _inputRef$current$upd, _inputRef$current;
|
|
143
155
|
e.stopPropagation();
|
|
144
156
|
if (e.relatedTarget === context.inputRefs[1 - info.index]) return;
|
|
145
157
|
(_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 || _props$onBlur.call(props, e);
|
|
158
|
+
if (inputRef.current) (_inputRef$current$upd = (_inputRef$current = inputRef.current).updateValue) === null || _inputRef$current$upd === void 0 || _inputRef$current$upd.call(_inputRef$current);
|
|
146
159
|
context.clickIndex = 0;
|
|
147
160
|
},
|
|
148
161
|
onFocus: function onFocus(e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["date-picker.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAiB1E,QAAA,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["date-picker.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAiB1E,QAAA,MAAM,UAAU,oFA8Rf,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -13,7 +13,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
13
13
|
import { useDatePickerFormat, useInputAble, usePersistFn, usePopup, util } from '@sheinx/hooks';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
15
|
import { AbsoluteList } from "../absolute-list";
|
|
16
|
-
import React, { useEffect } from 'react';
|
|
16
|
+
import React, { useEffect, useRef } from 'react';
|
|
17
17
|
import AnimationList from "../animation-list";
|
|
18
18
|
import Picker from "./picker";
|
|
19
19
|
import { getLocale } from "../config";
|
|
@@ -52,6 +52,9 @@ var DatePicker = function DatePicker(props0) {
|
|
|
52
52
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
53
53
|
activeIndex = _React$useState2[0],
|
|
54
54
|
setActiveIndex = _React$useState2[1];
|
|
55
|
+
var inputRef = useRef({
|
|
56
|
+
inputRef: null
|
|
57
|
+
});
|
|
55
58
|
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$datePicker = jssStyle.datePicker) === null || _jssStyle$datePicker === void 0 ? void 0 : _jssStyle$datePicker.call(jssStyle);
|
|
56
59
|
var isRTL = direction === 'rtl';
|
|
57
60
|
var dfp = isRTL ? 'bottom-right' : 'bottom-left';
|
|
@@ -150,6 +153,11 @@ var DatePicker = function DatePicker(props0) {
|
|
|
150
153
|
setFocused(false);
|
|
151
154
|
(_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 || _props$onBlur.call(props, e);
|
|
152
155
|
});
|
|
156
|
+
var handleClose = function handleClose() {
|
|
157
|
+
var _inputRef$current$inp;
|
|
158
|
+
closePop();
|
|
159
|
+
(_inputRef$current$inp = inputRef.current.inputRef) === null || _inputRef$current$inp === void 0 || _inputRef$current$inp.blur();
|
|
160
|
+
};
|
|
153
161
|
var handleResultClick = usePersistFn(function () {
|
|
154
162
|
if (disabledStatus === 'all') return;
|
|
155
163
|
openPop();
|
|
@@ -162,6 +170,7 @@ var DatePicker = function DatePicker(props0) {
|
|
|
162
170
|
activeIndex: activeIndex,
|
|
163
171
|
type: type,
|
|
164
172
|
range: range,
|
|
173
|
+
onRef: inputRef,
|
|
165
174
|
inputable: props.inputable && !props.formatResult,
|
|
166
175
|
disabledLeft: disabledStatus === 'left',
|
|
167
176
|
disabledRight: disabledStatus === 'right',
|
|
@@ -190,7 +199,7 @@ var DatePicker = function DatePicker(props0) {
|
|
|
190
199
|
onKeyDown: function onKeyDown(e) {
|
|
191
200
|
if (e.key === 'Enter') {
|
|
192
201
|
if (open) {
|
|
193
|
-
|
|
202
|
+
handleClose();
|
|
194
203
|
} else {
|
|
195
204
|
openPop();
|
|
196
205
|
}
|
|
@@ -247,7 +256,7 @@ var DatePicker = function DatePicker(props0) {
|
|
|
247
256
|
options: options,
|
|
248
257
|
disabled: disabled,
|
|
249
258
|
jssStyle: jssStyle,
|
|
250
|
-
closePop:
|
|
259
|
+
closePop: handleClose,
|
|
251
260
|
defaultTime: props.defaultTime,
|
|
252
261
|
min: props.min,
|
|
253
262
|
max: props.max,
|
|
@@ -11,6 +11,9 @@ export declare const Input: (props: {
|
|
|
11
11
|
onMouseDown?: ((e: React.MouseEvent) => void) | undefined;
|
|
12
12
|
open?: boolean | undefined;
|
|
13
13
|
disabled?: boolean | undefined;
|
|
14
|
+
inputRef?: React.MutableRefObject<{
|
|
15
|
+
updateValue?: React.Dispatch<React.SetStateAction<string>> | undefined;
|
|
16
|
+
} | undefined> | undefined;
|
|
14
17
|
onPaste?: ((e: React.ClipboardEvent) => void) | undefined;
|
|
15
18
|
onFocus?: ((e: React.FocusEvent) => void) | undefined;
|
|
16
19
|
onBlur?: ((e: React.FocusEvent) => void) | undefined;
|
|
@@ -25,6 +28,9 @@ interface ResultProps extends Pick<DatePickerProps<string>, 'jssStyle' | 'type'
|
|
|
25
28
|
disabledLeft?: boolean;
|
|
26
29
|
disabledRight?: boolean;
|
|
27
30
|
activeIndex?: number;
|
|
31
|
+
onRef: React.MutableRefObject<{
|
|
32
|
+
inputRef: HTMLInputElement | null;
|
|
33
|
+
}>;
|
|
28
34
|
onFocus?: (e: React.FocusEvent) => void;
|
|
29
35
|
onBlur?: (e: React.FocusEvent) => void;
|
|
30
36
|
onClick?: (e?: React.MouseEvent) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["result.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,eAAO,MAAM,KAAK;;WAET,MAAM;;;;kBAIC,MAAM,KAAK,IAAI;mBACf,gBAAgB,KAAK,IAAI;uBACrB,gBAAgB,KAAK,IAAI
|
|
1
|
+
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["result.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,eAAO,MAAM,KAAK;;WAET,MAAM;;;;kBAIC,MAAM,KAAK,IAAI;mBACf,gBAAgB,KAAK,IAAI;uBACrB,gBAAgB,KAAK,IAAI;;;;;;mBAS7B,oBAAoB,KAAK,IAAI;mBAC7B,gBAAgB,KAAK,IAAI;kBAC1B,gBAAgB,KAAK,IAAI;oBACvB,gBAAgB,KAAK,IAAI;iBAyCzC,CAAC;AACF,UAAU,WACR,SAAQ,IAAI,CACV,eAAe,CAAC,MAAM,CAAC,EACvB,UAAU,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,GAAG,aAAa,CAC5D;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,eAAe,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC3C,SAAS,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACrC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,KAAK,CAAC,gBAAgB,CAAC;QAC5B,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAC;KACnC,CAAC,CAAC;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IACxC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;CAC1C;AACD,QAAA,MAAM,MAAM,UAAW,WAAW,gBA0JjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -14,6 +14,14 @@ export var Input = function Input(props) {
|
|
|
14
14
|
_useState2 = _slicedToArray(_useState, 2),
|
|
15
15
|
value = _useState2[0],
|
|
16
16
|
setValue = _useState2[1];
|
|
17
|
+
var updateValue = function updateValue() {
|
|
18
|
+
setValue(props.value);
|
|
19
|
+
};
|
|
20
|
+
if (props.inputRef) {
|
|
21
|
+
props.inputRef.current = {
|
|
22
|
+
updateValue: updateValue
|
|
23
|
+
};
|
|
24
|
+
}
|
|
17
25
|
useEffect(function () {
|
|
18
26
|
setValue(props.value);
|
|
19
27
|
}, [props.value, props.open]);
|
|
@@ -52,6 +60,7 @@ var Result = function Result(props) {
|
|
|
52
60
|
range = props.range,
|
|
53
61
|
placeholder = props.placeholder,
|
|
54
62
|
_onChange = props.onChange,
|
|
63
|
+
_onRef = props.onRef,
|
|
55
64
|
disabledLeft = props.disabledLeft,
|
|
56
65
|
disabledRight = props.disabledRight,
|
|
57
66
|
_props$activeIndex = props.activeIndex,
|
|
@@ -65,6 +74,7 @@ var Result = function Result(props) {
|
|
|
65
74
|
clickIndex: 0
|
|
66
75
|
}),
|
|
67
76
|
context = _useRef.current;
|
|
77
|
+
var inputRef = useRef({});
|
|
68
78
|
useEffect(function () {
|
|
69
79
|
if (open) {
|
|
70
80
|
if (context.inputRefs[activeIndex]) {
|
|
@@ -117,10 +127,12 @@ var Result = function Result(props) {
|
|
|
117
127
|
className: styles === null || styles === void 0 ? void 0 : styles.resultTextPadding,
|
|
118
128
|
children: info.inputable ? /*#__PURE__*/_jsx(Input, {
|
|
119
129
|
onRef: function onRef(el) {
|
|
130
|
+
_onRef.current.inputRef = el;
|
|
120
131
|
context.inputRefs[info.index] = el;
|
|
121
132
|
},
|
|
122
133
|
disabled: dis,
|
|
123
134
|
open: !!open,
|
|
135
|
+
inputRef: inputRef,
|
|
124
136
|
value: info.target || info.value || '',
|
|
125
137
|
placeholder: info.place,
|
|
126
138
|
onChange: function onChange(s) {
|
|
@@ -130,10 +142,11 @@ var Result = function Result(props) {
|
|
|
130
142
|
context.clickIndex = info.index;
|
|
131
143
|
},
|
|
132
144
|
onBlur: function onBlur(e) {
|
|
133
|
-
var _props$onBlur;
|
|
145
|
+
var _props$onBlur, _inputRef$current$upd, _inputRef$current;
|
|
134
146
|
e.stopPropagation();
|
|
135
147
|
if (e.relatedTarget === context.inputRefs[1 - info.index]) return;
|
|
136
148
|
(_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 || _props$onBlur.call(props, e);
|
|
149
|
+
if (inputRef.current) (_inputRef$current$upd = (_inputRef$current = inputRef.current).updateValue) === null || _inputRef$current$upd === void 0 || _inputRef$current$upd.call(_inputRef$current);
|
|
137
150
|
context.clickIndex = 0;
|
|
138
151
|
},
|
|
139
152
|
onFocus: function onFocus(e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheinx/base",
|
|
3
|
-
"version": "3.3.3-beta.
|
|
3
|
+
"version": "3.3.3-beta.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"module": "./esm/index.js",
|
|
11
11
|
"typings": "./cjs/index.d.ts",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@sheinx/hooks": "3.3.3-beta.
|
|
13
|
+
"@sheinx/hooks": "3.3.3-beta.8",
|
|
14
14
|
"immer": "^10.0.0",
|
|
15
15
|
"classnames": "^2.0.0",
|
|
16
16
|
"@shined/reactive": "^0.1.3-alpha.0"
|