@titaui/pc 1.11.4-12 → 1.11.4-13
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.
|
@@ -253,9 +253,12 @@ var TimePicker = function TimePicker(props) {
|
|
|
253
253
|
};
|
|
254
254
|
|
|
255
255
|
(0, _react.useEffect)(function () {
|
|
256
|
-
|
|
257
|
-
|
|
256
|
+
timerRef.current = setTimeout(function () {
|
|
257
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
258
|
+
timeSetingtType && document.addEventListener('keydown', handleKeyDown);
|
|
259
|
+
}, 0);
|
|
258
260
|
return function () {
|
|
261
|
+
clearTimeout(timerRef.current);
|
|
259
262
|
document.removeEventListener('keydown', handleKeyDown);
|
|
260
263
|
};
|
|
261
264
|
}, [timeSetingtType]);
|
|
@@ -32,7 +32,7 @@ var TimePickerInput = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref)
|
|
|
32
32
|
_props$stopPropagatio = props.stopPropagation,
|
|
33
33
|
stopPropagation = _props$stopPropagatio === void 0 ? true : _props$stopPropagatio,
|
|
34
34
|
_props$type = props.type,
|
|
35
|
-
type = _props$type === void 0 ?
|
|
35
|
+
type = _props$type === void 0 ? 'text' : _props$type,
|
|
36
36
|
value = props.value,
|
|
37
37
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
38
38
|
|
|
@@ -80,6 +80,8 @@ var TimePickerInput = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref)
|
|
|
80
80
|
setSelectionRange(changeTimeout);
|
|
81
81
|
}, [value]);
|
|
82
82
|
return /*#__PURE__*/_react["default"].createElement("input", _extends({
|
|
83
|
+
autoFocus: false,
|
|
84
|
+
autoComplete: "off",
|
|
83
85
|
className: className,
|
|
84
86
|
maxLength: maxLength,
|
|
85
87
|
onClick: onClickHandler,
|