@aloudata/aloudata-design 2.15.8 → 2.15.10
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/dist/AldSelect/BaseSelect.js +2 -0
- package/dist/AldSelect/components/Suffix.d.ts +2 -1
- package/dist/AldSelect/components/Suffix.js +3 -2
- package/dist/AldSelect/index.js +7 -2
- package/dist/AldSelect/style/color.less +3 -1
- package/dist/AldSelect/style/index.less +0 -1
- package/dist/Checkbox/style/index.less +1 -4
- package/dist/ColorPicker/ComplexColorPicker/index.js +11 -3
- package/dist/ColorPicker/index.js +1 -0
- package/dist/ColorPicker/interface.d.ts +2 -0
- package/dist/ColorPicker/style/complex.less +38 -1
- package/dist/ColorPicker/style/index.less +5 -2
- package/dist/Input/style/status.less +2 -5
- package/dist/InputNumber/style/index.less +2 -2
- package/dist/InputSearch/index.d.ts +1 -0
- package/dist/InputSearch/index.js +36 -8
- package/dist/Table/hooks/useFixed.d.ts +1 -0
- package/dist/Table/hooks/useFixed.js +2 -1
- package/dist/Table/index.js +189 -38
- package/dist/Table/style/index.less +7 -0
- package/dist/ald.min.css +1 -1
- package/package.json +1 -1
|
@@ -97,6 +97,7 @@ var BaseSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
97
97
|
var _useContext = useContext(FormItemInputContext),
|
|
98
98
|
contextStatus = _useContext.status;
|
|
99
99
|
var mergedStatus = customStatus || contextStatus || undefined;
|
|
100
|
+
|
|
100
101
|
// =========================== Imperative ===========================
|
|
101
102
|
React.useImperativeHandle(ref, function () {
|
|
102
103
|
return {
|
|
@@ -246,6 +247,7 @@ var BaseSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
246
247
|
})))), /*#__PURE__*/React.createElement(Suffix, {
|
|
247
248
|
showArrow: showArrow,
|
|
248
249
|
allowClear: allowClear,
|
|
250
|
+
disabled: disabled,
|
|
249
251
|
isHover: isHover,
|
|
250
252
|
onClear: function onClear() {
|
|
251
253
|
onToggleOpen(false);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DisplayValueType } from '../interface';
|
|
3
|
-
export default function Suffix({ showArrow, allowClear, isActive, isHover, icon, onClear, displayValues, }: {
|
|
3
|
+
export default function Suffix({ showArrow, allowClear, isActive, isHover, icon, onClear, displayValues, disabled, }: {
|
|
4
4
|
showArrow?: boolean;
|
|
5
5
|
allowClear?: boolean;
|
|
6
6
|
isActive?: boolean;
|
|
7
7
|
isHover?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
8
9
|
icon: React.ReactNode;
|
|
9
10
|
onClear?: () => void;
|
|
10
11
|
displayValues: DisplayValueType[];
|
|
@@ -8,9 +8,10 @@ export default function Suffix(_ref) {
|
|
|
8
8
|
isHover = _ref.isHover,
|
|
9
9
|
icon = _ref.icon,
|
|
10
10
|
onClear = _ref.onClear,
|
|
11
|
-
displayValues = _ref.displayValues
|
|
11
|
+
displayValues = _ref.displayValues,
|
|
12
|
+
disabled = _ref.disabled;
|
|
12
13
|
var classNames = prefixCls('select');
|
|
13
|
-
if ((isActive || isHover) && allowClear && displayValues.length > 0) {
|
|
14
|
+
if ((isActive || isHover) && !disabled && allowClear && displayValues.length > 0) {
|
|
14
15
|
return /*#__PURE__*/React.createElement("div", {
|
|
15
16
|
className: classNames('suffix', 'clear'),
|
|
16
17
|
onClick: function onClick(event) {
|
package/dist/AldSelect/index.js
CHANGED
|
@@ -15,7 +15,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
15
15
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
16
16
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
|
-
import React, { forwardRef, useCallback, useMemo } from 'react';
|
|
18
|
+
import React, { forwardRef, useCallback, useContext, useMemo } from 'react';
|
|
19
19
|
import useOptions, { isRawValue } from "./hooks/useOptions";
|
|
20
20
|
import useMergedState from 'rc-util/lib/hooks/useMergedState';
|
|
21
21
|
import { toArray } from "./utils/commonUtil";
|
|
@@ -24,6 +24,7 @@ import BaseSelect, { isMultiple } from "./BaseSelect";
|
|
|
24
24
|
import { injectPropsWithOption } from "./utils/valueUtil";
|
|
25
25
|
import useDisplayMenu from "./hooks/useDisplayMenu";
|
|
26
26
|
import { toString } from "./utils/commonUtil";
|
|
27
|
+
import DisabledContext from 'antd/lib/config-provider/DisabledContext';
|
|
27
28
|
export default /*#__PURE__*/forwardRef(function AldSelect(props, ref) {
|
|
28
29
|
var value = props.value,
|
|
29
30
|
defaultValue = props.defaultValue,
|
|
@@ -37,7 +38,8 @@ export default /*#__PURE__*/forwardRef(function AldSelect(props, ref) {
|
|
|
37
38
|
filterOption = props.filterOption,
|
|
38
39
|
searchValue = props.searchValue,
|
|
39
40
|
optionLabelProp = props.optionLabelProp,
|
|
40
|
-
listHeight = props.listHeight
|
|
41
|
+
listHeight = props.listHeight,
|
|
42
|
+
customDisabled = props.disabled;
|
|
41
43
|
|
|
42
44
|
// =========================== Values ===========================
|
|
43
45
|
var _useMergedState = useMergedState(defaultValue, {
|
|
@@ -46,6 +48,8 @@ export default /*#__PURE__*/forwardRef(function AldSelect(props, ref) {
|
|
|
46
48
|
_useMergedState2 = _slicedToArray(_useMergedState, 2),
|
|
47
49
|
internalValue = _useMergedState2[0],
|
|
48
50
|
setInternalValue = _useMergedState2[1];
|
|
51
|
+
var disabled = useContext(DisabledContext);
|
|
52
|
+
var mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
|
|
49
53
|
var parsedOptions = useOptions({
|
|
50
54
|
menu: menu,
|
|
51
55
|
options: options,
|
|
@@ -228,6 +232,7 @@ export default /*#__PURE__*/forwardRef(function AldSelect(props, ref) {
|
|
|
228
232
|
var displayMenu = useDisplayMenu(selectMenu, filterOption, innerSearchValue);
|
|
229
233
|
return /*#__PURE__*/React.createElement(BaseSelect, _extends({}, props, {
|
|
230
234
|
ref: ref,
|
|
235
|
+
disabled: mergedDisabled,
|
|
231
236
|
displayValues: displayValues,
|
|
232
237
|
onDisplayValuesChange: onDisplayValuesChange,
|
|
233
238
|
setInnerSearchValue: setInnerSearchValue,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
.beta-ald-select {
|
|
2
2
|
border-color: #d1d5db;
|
|
3
3
|
color: #1f2937;
|
|
4
|
+
background-color: #fff;
|
|
4
5
|
|
|
5
6
|
&-active {
|
|
6
7
|
border-color: #007bff;
|
|
@@ -17,6 +18,7 @@
|
|
|
17
18
|
|
|
18
19
|
&-borderless {
|
|
19
20
|
border-color: transparent;
|
|
21
|
+
background-color: transparent;
|
|
20
22
|
color: #111827;
|
|
21
23
|
|
|
22
24
|
&:hover {
|
|
@@ -32,7 +34,7 @@
|
|
|
32
34
|
|
|
33
35
|
&-disabled {
|
|
34
36
|
border: 1px solid #d1d5db;
|
|
35
|
-
background: #
|
|
37
|
+
background: #f3f4f6;
|
|
36
38
|
|
|
37
39
|
&.beta-ald-select-borderless {
|
|
38
40
|
border-color: transparent;
|
|
@@ -31,10 +31,7 @@
|
|
|
31
31
|
--alias-colors-bg-selected-strong-press,
|
|
32
32
|
#0b4385
|
|
33
33
|
);
|
|
34
|
-
@checkbox-checked-inner-bgc-disabled:
|
|
35
|
-
--alias-colors-bg-disabled,
|
|
36
|
-
rgba(0, 0, 0, 0.05)
|
|
37
|
-
);
|
|
34
|
+
@checkbox-checked-inner-bgc-disabled: #f3f4f6;
|
|
38
35
|
|
|
39
36
|
@checkout-border-radius: var(--alias-radius-25);
|
|
40
37
|
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
4
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
1
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
6
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
7
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -10,6 +14,7 @@ import ColorInput from "./ColorInput";
|
|
|
10
14
|
import useColor from "../hooks/useColor";
|
|
11
15
|
import { genAlphaColor, generateColor, getColorAlpha } from "../util";
|
|
12
16
|
import Dropdown from "../../Dropdown";
|
|
17
|
+
import classNames from 'classnames';
|
|
13
18
|
var prefixCls = 'ald-color-picker';
|
|
14
19
|
export default function ColorPicker(props) {
|
|
15
20
|
var value = props.value,
|
|
@@ -19,7 +24,9 @@ export default function ColorPicker(props) {
|
|
|
19
24
|
onChangeComplete = props.onChangeComplete,
|
|
20
25
|
trigger = props.trigger,
|
|
21
26
|
open = props.open,
|
|
22
|
-
onOpenChange = props.onOpenChange
|
|
27
|
+
onOpenChange = props.onOpenChange,
|
|
28
|
+
_props$size = props.size,
|
|
29
|
+
size = _props$size === void 0 ? 'middle' : _props$size;
|
|
23
30
|
var _useColor = useColor(defaultValue, value),
|
|
24
31
|
_useColor2 = _slicedToArray(_useColor, 2),
|
|
25
32
|
mergedColor = _useColor2[0],
|
|
@@ -51,6 +58,7 @@ export default function ColorPicker(props) {
|
|
|
51
58
|
open: open,
|
|
52
59
|
trigger: trigger,
|
|
53
60
|
onOpenChange: onOpenChange,
|
|
61
|
+
overlayClassName: "".concat(prefixCls, "-overlay-wrapper"),
|
|
54
62
|
dropdownRender: function dropdownRender() {
|
|
55
63
|
return /*#__PURE__*/React.createElement("div", {
|
|
56
64
|
className: "".concat(prefixCls, "-wrapper")
|
|
@@ -71,9 +79,9 @@ export default function ColorPicker(props) {
|
|
|
71
79
|
}));
|
|
72
80
|
}
|
|
73
81
|
}, /*#__PURE__*/React.createElement("div", {
|
|
74
|
-
className: "".concat(prefixCls, "-trigger-wrapper")
|
|
82
|
+
className: classNames("".concat(prefixCls, "-trigger-wrapper"), _defineProperty({}, "".concat(prefixCls, "-trigger-wrapper-").concat(size), !!size))
|
|
75
83
|
}, /*#__PURE__*/React.createElement("div", {
|
|
76
|
-
className: "".concat(prefixCls, "-trigger-
|
|
84
|
+
className: "".concat(prefixCls, "-trigger-inner"),
|
|
77
85
|
style: {
|
|
78
86
|
backgroundColor: mergedColor.toCssString()
|
|
79
87
|
}
|
|
@@ -3,6 +3,7 @@ import type { ColorGenInput, ColorPickerProps as RcColorPickerProps } from '@rc-
|
|
|
3
3
|
import type { PopoverProps } from '../Popover';
|
|
4
4
|
import type { AggregationColor } from './color';
|
|
5
5
|
import { ITooltipProps } from '../Tooltip';
|
|
6
|
+
import { SizeType } from '../ConfigProvider/sizeContext';
|
|
6
7
|
export type { ColorGenInput };
|
|
7
8
|
export type Colors<T> = {
|
|
8
9
|
color: ColorGenInput<T>;
|
|
@@ -20,6 +21,7 @@ export type SingleValueType = AggregationColor | string;
|
|
|
20
21
|
export type ColorValueType = SingleValueType | null;
|
|
21
22
|
export type ColorPickerProps = Omit<RcColorPickerProps, 'onChange' | 'value' | 'defaultValue' | 'panelRender' | 'disabledAlpha' | 'onChangeComplete' | 'components'> & {
|
|
22
23
|
value?: ColorValueType;
|
|
24
|
+
size?: SizeType;
|
|
23
25
|
defaultValue?: ColorValueType;
|
|
24
26
|
children?: React.ReactNode;
|
|
25
27
|
open?: boolean;
|
|
@@ -152,8 +152,45 @@
|
|
|
152
152
|
|
|
153
153
|
.ald-color-picker-trigger-wrapper {
|
|
154
154
|
display: inline-flex;
|
|
155
|
+
padding: 3px;
|
|
156
|
+
border: 1px solid #d1d5db;
|
|
157
|
+
background-color: #fff;
|
|
158
|
+
|
|
159
|
+
.ald-color-picker-trigger-inner {
|
|
160
|
+
border: 1px solid rgba(0, 0, 0, 0.2);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.ald-color-picker-trigger-wrapper-small {
|
|
165
|
+
width: 28px;
|
|
166
|
+
height: 28px;
|
|
167
|
+
border-radius: 4px;
|
|
168
|
+
|
|
169
|
+
.ald-color-picker-trigger-inner {
|
|
170
|
+
width: 20px;
|
|
171
|
+
height: 20px;
|
|
172
|
+
border-radius: 2px;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.ald-color-picker-trigger-wrapper-middle {
|
|
177
|
+
width: 32px;
|
|
178
|
+
height: 32px;
|
|
179
|
+
border-radius: 6px;
|
|
180
|
+
|
|
181
|
+
.ald-color-picker-trigger-inner {
|
|
182
|
+
width: 24px;
|
|
183
|
+
height: 24px;
|
|
184
|
+
border-radius: 3px;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.ald-color-picker-trigger-wrapper-large {
|
|
189
|
+
width: 36px;
|
|
190
|
+
height: 36px;
|
|
191
|
+
border-radius: 8px;
|
|
155
192
|
|
|
156
|
-
.ald-color-picker-trigger-
|
|
193
|
+
.ald-color-picker-trigger-inner {
|
|
157
194
|
width: 28px;
|
|
158
195
|
height: 28px;
|
|
159
196
|
border-radius: 4px;
|
|
@@ -49,13 +49,16 @@
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
.ald-dropdown-overlay.ald-color-picker-overlay-wrapper {
|
|
53
|
+
padding: 0 !important;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
}
|
|
56
|
+
|
|
52
57
|
.ald-color-picker-overlay {
|
|
53
58
|
position: relative;
|
|
54
59
|
width: 253px;
|
|
55
60
|
background: #fff;
|
|
56
|
-
border: 1px solid #dbdbdb;
|
|
57
61
|
box-sizing: border-box;
|
|
58
|
-
box-shadow: 0 10px 18px -2px rgba(0, 0, 0, 0.08);
|
|
59
62
|
border-radius: 2px;
|
|
60
63
|
padding: 8px 7px;
|
|
61
64
|
|
|
@@ -27,11 +27,8 @@
|
|
|
27
27
|
@input-focus-placeholder-color: var(--alias-colors-text-subtlest, #9ca3af);
|
|
28
28
|
|
|
29
29
|
//color disabled
|
|
30
|
-
@input-disabled-border-color:
|
|
31
|
-
|
|
32
|
-
rgba(0, 0, 0, 0.1)
|
|
33
|
-
);
|
|
34
|
-
@input-disabled-bg-color: var(--alias-colors-bg-transp, rgba(0, 0, 0, 0));
|
|
30
|
+
@input-disabled-border-color: #d1d5db;
|
|
31
|
+
@input-disabled-bg-color: #f3f4f6;
|
|
35
32
|
@input-disabled-text-color: var(
|
|
36
33
|
--alias-colors-text-disabled,
|
|
37
34
|
rgba(0, 0, 0, 0.25)
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
@inputNumber-active-border-color: var(--alias-colors-border-selected, #126fdd);
|
|
30
30
|
|
|
31
31
|
//disable
|
|
32
|
-
@inputNumber-disabled-bg-color:
|
|
33
|
-
@inputNumber-disabled-border-color:
|
|
32
|
+
@inputNumber-disabled-bg-color: #f3f4f6;
|
|
33
|
+
@inputNumber-disabled-border-color: #d1d5db;
|
|
34
34
|
@inputNumber-disabled-color: @NL40;
|
|
35
35
|
//光标颜色
|
|
36
36
|
@inputNumber-cursor-color: @B60;
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
export default function InputSearch(props: IProps): React.JSX.Element;
|
|
3
3
|
interface IProps {
|
|
4
4
|
onSearch: (value: string) => void;
|
|
5
|
+
onBlur?: (value: string, e: React.FocusEvent<HTMLInputElement>) => void;
|
|
5
6
|
className?: string;
|
|
6
7
|
debounce?: boolean;
|
|
7
8
|
placeholder?: string;
|
|
@@ -13,7 +13,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
13
13
|
import { useDebounceFn } from 'ahooks';
|
|
14
14
|
import classnames from 'classnames';
|
|
15
15
|
import _ from 'lodash';
|
|
16
|
-
import React, { useCallback, useContext, useMemo, useState } from 'react';
|
|
16
|
+
import React, { useCallback, useContext, useMemo, useRef, useState } from 'react';
|
|
17
17
|
import { SearchLine } from "../Icon";
|
|
18
18
|
import Input from "../Input";
|
|
19
19
|
import { ELangType, LocaleContext, getTranslator } from "../locale/default";
|
|
@@ -38,7 +38,8 @@ export default function InputSearch(props) {
|
|
|
38
38
|
defaultValue = props.defaultValue,
|
|
39
39
|
_props$inputMode = props.inputMode,
|
|
40
40
|
inputMode = _props$inputMode === void 0 ? false : _props$inputMode,
|
|
41
|
-
style = props.style
|
|
41
|
+
style = props.style,
|
|
42
|
+
_onBlur = props.onBlur;
|
|
42
43
|
var defaultWidth = useMemo(function () {
|
|
43
44
|
if (size === 'small') {
|
|
44
45
|
if (locale === ELangType.EN) {
|
|
@@ -61,24 +62,44 @@ export default function InputSearch(props) {
|
|
|
61
62
|
_useState2 = _slicedToArray(_useState, 2),
|
|
62
63
|
searchValue = _useState2[0],
|
|
63
64
|
setSearchValue = _useState2[1];
|
|
65
|
+
var isComposing = useRef(false);
|
|
64
66
|
var onPressEnter = useCallback(function (e) {
|
|
65
|
-
|
|
67
|
+
if (!isComposing.current) {
|
|
68
|
+
onSearch(_.trim(e.target.value));
|
|
69
|
+
}
|
|
66
70
|
}, [onSearch]);
|
|
67
71
|
var DEFAULT_DEBOUNCE_TIME = 500;
|
|
68
72
|
var _useDebounceFn = useDebounceFn(function (val) {
|
|
69
|
-
|
|
73
|
+
if (!isComposing.current) {
|
|
74
|
+
onSearch(val);
|
|
75
|
+
}
|
|
70
76
|
}, {
|
|
71
77
|
wait: DEFAULT_DEBOUNCE_TIME
|
|
72
78
|
}),
|
|
73
79
|
debounceSearch = _useDebounceFn.run;
|
|
74
80
|
var onChangeValue = useCallback(function (e) {
|
|
75
81
|
var newValue = e.target.value;
|
|
82
|
+
setSearchValue(newValue);
|
|
83
|
+
if (!isComposing.current) {
|
|
84
|
+
if (debounce) {
|
|
85
|
+
debounceSearch(newValue);
|
|
86
|
+
} else {
|
|
87
|
+
onSearch(newValue);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}, [debounce, debounceSearch, onSearch]);
|
|
91
|
+
var handleCompositionStart = useCallback(function () {
|
|
92
|
+
isComposing.current = true;
|
|
93
|
+
}, []);
|
|
94
|
+
var handleCompositionEnd = useCallback(function (e) {
|
|
95
|
+
isComposing.current = false;
|
|
96
|
+
// 在输入法结束后触发一次搜索
|
|
97
|
+
var value = e.target.value;
|
|
76
98
|
if (debounce) {
|
|
77
|
-
debounceSearch(
|
|
99
|
+
debounceSearch(value);
|
|
78
100
|
} else {
|
|
79
|
-
onSearch(
|
|
101
|
+
onSearch(value);
|
|
80
102
|
}
|
|
81
|
-
setSearchValue(newValue);
|
|
82
103
|
}, [debounce, debounceSearch, onSearch]);
|
|
83
104
|
var iconSize = useMemo(function () {
|
|
84
105
|
if (size === 'middle' || size === 'large') {
|
|
@@ -99,11 +120,18 @@ export default function InputSearch(props) {
|
|
|
99
120
|
status: 'success',
|
|
100
121
|
onChange: onChangeValue,
|
|
101
122
|
onPressEnter: onPressEnter,
|
|
123
|
+
onCompositionStart: handleCompositionStart,
|
|
124
|
+
onCompositionEnd: handleCompositionEnd,
|
|
102
125
|
prefix: /*#__PURE__*/React.createElement(SearchLine, {
|
|
103
126
|
size: iconSize
|
|
104
127
|
}),
|
|
105
128
|
placeholder: placeholder || t.InputSearch.search,
|
|
106
129
|
allowClear: true,
|
|
107
|
-
defaultValue: defaultValue
|
|
130
|
+
defaultValue: defaultValue,
|
|
131
|
+
onBlur: function onBlur(e) {
|
|
132
|
+
if (_onBlur) {
|
|
133
|
+
_onBlur(searchValue, e);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
108
136
|
}));
|
|
109
137
|
}
|
|
@@ -30,7 +30,8 @@ export default function useFixed(_ref) {
|
|
|
30
30
|
}
|
|
31
31
|
return {
|
|
32
32
|
className: classnames((_classnames = {}, _defineProperty(_classnames, prefixCls('fixed-left'), fixed === 'left'), _defineProperty(_classnames, prefixCls('fixed-right'), fixed === 'right'), _classnames)),
|
|
33
|
-
style: style
|
|
33
|
+
style: style,
|
|
34
|
+
fixed: fixed
|
|
34
35
|
};
|
|
35
36
|
}, [tableColumns, y, scrollbarWidth, columnWidths]);
|
|
36
37
|
}
|