@douyinfe/semi-ui 2.37.0-beta.0 → 2.38.0-beta.0
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/css/semi.css +11 -1
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +43 -17
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/cjs/badge/index.d.ts +1 -1
- package/lib/cjs/cascader/index.js +1 -1
- package/lib/cjs/image/preview.js +4 -2
- package/lib/cjs/input/index.d.ts +1 -0
- package/lib/cjs/input/index.js +15 -1
- package/lib/cjs/pagination/index.js +1 -1
- package/lib/cjs/toast/useToast/index.js +16 -8
- package/lib/cjs/tree/index.js +2 -2
- package/lib/cjs/treeSelect/index.js +3 -1
- package/lib/es/badge/index.d.ts +1 -1
- package/lib/es/cascader/index.js +1 -1
- package/lib/es/image/preview.js +4 -2
- package/lib/es/input/index.d.ts +1 -0
- package/lib/es/input/index.js +15 -1
- package/lib/es/pagination/index.js +1 -1
- package/lib/es/toast/useToast/index.js +14 -8
- package/lib/es/tree/index.js +2 -2
- package/lib/es/treeSelect/index.js +3 -1
- package/package.json +8 -8
package/lib/cjs/badge/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import React, { PureComponent } from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { ContextValue } from '../configProvider/context';
|
|
4
4
|
import '@douyinfe/semi-foundation/lib/cjs/badge/badge.css';
|
|
5
|
-
export type BadgeType = 'primary' | 'secondary' | 'tertiary' | 'danger' | 'warning';
|
|
5
|
+
export type BadgeType = 'primary' | 'secondary' | 'tertiary' | 'danger' | 'warning' | 'success';
|
|
6
6
|
export type BadgeTheme = 'solid' | 'light' | 'inverted';
|
|
7
7
|
export type BadgePosition = 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom';
|
|
8
8
|
export interface BadgeProps {
|
|
@@ -169,7 +169,7 @@ class Cascader extends _baseComponent.default {
|
|
|
169
169
|
const renderPlusNChildren = /*#__PURE__*/_react.default.createElement("span", {
|
|
170
170
|
className: plusNCls
|
|
171
171
|
}, "+", hiddenTag.length);
|
|
172
|
-
return showRestTagsPopover
|
|
172
|
+
return showRestTagsPopover ? /*#__PURE__*/_react.default.createElement(_index2.default, Object.assign({
|
|
173
173
|
content: hiddenTag,
|
|
174
174
|
showArrow: true,
|
|
175
175
|
trigger: "hover",
|
package/lib/cjs/image/preview.js
CHANGED
|
@@ -15,6 +15,7 @@ var _previewFoundation = _interopRequireDefault(require("@douyinfe/semi-foundati
|
|
|
15
15
|
var _uuid = require("@douyinfe/semi-foundation/lib/cjs/utils/uuid");
|
|
16
16
|
var _constants = require("@douyinfe/semi-foundation/lib/cjs/image/constants");
|
|
17
17
|
require("@douyinfe/semi-foundation/lib/cjs/image/image.css");
|
|
18
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
18
19
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
20
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -147,10 +148,11 @@ class Preview extends _baseComponent.default {
|
|
|
147
148
|
const _a = this.props,
|
|
148
149
|
{
|
|
149
150
|
src,
|
|
151
|
+
className,
|
|
150
152
|
style,
|
|
151
153
|
lazyLoad
|
|
152
154
|
} = _a,
|
|
153
|
-
restProps = __rest(_a, ["src", "style", "lazyLoad"]);
|
|
155
|
+
restProps = __rest(_a, ["src", "className", "style", "lazyLoad"]);
|
|
154
156
|
const {
|
|
155
157
|
currentIndex,
|
|
156
158
|
visible
|
|
@@ -177,7 +179,7 @@ class Preview extends _baseComponent.default {
|
|
|
177
179
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
178
180
|
id: this.previewGroupId,
|
|
179
181
|
style: style,
|
|
180
|
-
className: `${prefixCls}-preview-group
|
|
182
|
+
className: (0, _classnames.default)(`${prefixCls}-preview-group`, className)
|
|
181
183
|
}, newChildren), /*#__PURE__*/_react.default.createElement(_previewInner.default, Object.assign({}, restProps, {
|
|
182
184
|
ref: this.previewRef,
|
|
183
185
|
src: finalSrcList,
|
package/lib/cjs/input/index.d.ts
CHANGED
|
@@ -168,6 +168,7 @@ declare class Input extends BaseComponent<InputProps, InputState> {
|
|
|
168
168
|
};
|
|
169
169
|
static getDerivedStateFromProps(props: InputProps, state: InputState): Partial<InputState>;
|
|
170
170
|
componentDidUpdate(prevProps: InputProps): void;
|
|
171
|
+
componentDidMount(): void;
|
|
171
172
|
handleClear: (e: React.MouseEvent<HTMLInputElement>) => void;
|
|
172
173
|
handleClick: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
173
174
|
handleMouseOver: (e: React.MouseEvent<HTMLDivElement>) => void;
|
package/lib/cjs/input/index.js
CHANGED
|
@@ -144,6 +144,21 @@ class Input extends _baseComponent.default {
|
|
|
144
144
|
this.handleModeChange(mode);
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
+
componentDidMount() {
|
|
148
|
+
// autofocus is changed from the original support of input to the support of manually calling the focus method,
|
|
149
|
+
// so that preventScroll can still take effect under the setting of autofocus
|
|
150
|
+
this.foundation.init();
|
|
151
|
+
const {
|
|
152
|
+
disabled,
|
|
153
|
+
autofocus,
|
|
154
|
+
preventScroll
|
|
155
|
+
} = this.props;
|
|
156
|
+
if (!disabled && autofocus) {
|
|
157
|
+
this.inputRef.current.focus({
|
|
158
|
+
preventScroll
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
}
|
|
147
162
|
renderPrepend() {
|
|
148
163
|
const {
|
|
149
164
|
addonBefore
|
|
@@ -368,7 +383,6 @@ class Input extends _baseComponent.default {
|
|
|
368
383
|
const inputValue = value === null || value === undefined ? '' : value;
|
|
369
384
|
const inputProps = Object.assign(Object.assign({}, rest), {
|
|
370
385
|
style: inputStyle,
|
|
371
|
-
autoFocus: autofocus,
|
|
372
386
|
className: inputCls,
|
|
373
387
|
disabled,
|
|
374
388
|
readOnly: readonly,
|
|
@@ -181,7 +181,7 @@ class Pagination extends _baseComponent.default {
|
|
|
181
181
|
"aria-label": "Next",
|
|
182
182
|
onClick: e => !isDisabled && this.foundation.goNext(e),
|
|
183
183
|
className: nextClassName,
|
|
184
|
-
"x-semi-prop": "
|
|
184
|
+
"x-semi-prop": "nextText"
|
|
185
185
|
}, nextText || /*#__PURE__*/_react.default.createElement(_semiIcons.IconChevronRight, {
|
|
186
186
|
size: "large"
|
|
187
187
|
}));
|
|
@@ -4,9 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = useToast;
|
|
7
|
-
var
|
|
7
|
+
var _noop2 = _interopRequireDefault(require("lodash/noop"));
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
9
|
var _uuid = _interopRequireDefault(require("@douyinfe/semi-foundation/lib/cjs/utils/uuid"));
|
|
9
10
|
var _HookToast = _interopRequireDefault(require("./HookToast"));
|
|
11
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
10
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
14
|
// const ref = null;
|
|
12
15
|
// TODO: toast larger than N bars, automatic folding, allowing expansion, N configurable
|
|
@@ -35,7 +38,7 @@ function usePatchElement() {
|
|
|
35
38
|
}
|
|
36
39
|
function useToast() {
|
|
37
40
|
const [elements, patchElement] = usePatchElement();
|
|
38
|
-
const toastRef = new Map();
|
|
41
|
+
const toastRef = (0, _react.useRef)(new Map());
|
|
39
42
|
const addToast = config => {
|
|
40
43
|
const id = (0, _uuid.default)('semi_toast_');
|
|
41
44
|
const mergeConfig = Object.assign(Object.assign({}, config), {
|
|
@@ -43,20 +46,25 @@ function useToast() {
|
|
|
43
46
|
});
|
|
44
47
|
// eslint-disable-next-line prefer-const
|
|
45
48
|
let closeFunc;
|
|
46
|
-
const ref = ele => {
|
|
47
|
-
toastRef.set(id, ele);
|
|
48
|
-
};
|
|
49
49
|
const toast = /*#__PURE__*/_react.default.createElement(_HookToast.default, Object.assign({}, mergeConfig, {
|
|
50
50
|
key: id,
|
|
51
51
|
afterClose: instanceId => closeFunc(instanceId),
|
|
52
|
-
ref:
|
|
52
|
+
ref: data => {
|
|
53
|
+
var _a;
|
|
54
|
+
toastRef.current.set(id, {
|
|
55
|
+
close: (_a = data === null || data === void 0 ? void 0 : data.close) !== null && _a !== void 0 ? _a : _noop2.default
|
|
56
|
+
});
|
|
57
|
+
}
|
|
53
58
|
}));
|
|
54
59
|
closeFunc = patchElement(toast, Object.assign({}, mergeConfig));
|
|
55
60
|
return id;
|
|
56
61
|
};
|
|
57
62
|
const removeElement = id => {
|
|
58
|
-
|
|
59
|
-
|
|
63
|
+
var _a;
|
|
64
|
+
const {
|
|
65
|
+
close
|
|
66
|
+
} = (_a = toastRef.current.get(id)) !== null && _a !== void 0 ? _a : {};
|
|
67
|
+
close === null || close === void 0 ? void 0 : close();
|
|
60
68
|
};
|
|
61
69
|
return [{
|
|
62
70
|
success: config => addToast(Object.assign(Object.assign(Object.assign({}, defaultOpts), config), {
|
package/lib/cjs/tree/index.js
CHANGED
|
@@ -463,8 +463,8 @@ class Tree extends _baseComponent.default {
|
|
|
463
463
|
notifyChange: value => {
|
|
464
464
|
this.props.onChange && this.props.onChange(value);
|
|
465
465
|
},
|
|
466
|
-
notifySearch: input => {
|
|
467
|
-
this.props.onSearch && this.props.onSearch(input);
|
|
466
|
+
notifySearch: (input, filteredExpandedKeys) => {
|
|
467
|
+
this.props.onSearch && this.props.onSearch(input, filteredExpandedKeys);
|
|
468
468
|
},
|
|
469
469
|
notifyRightClick: (e, node) => {
|
|
470
470
|
this.props.onContextMenu && this.props.onContextMenu(e, node);
|
|
@@ -571,7 +571,8 @@ class TreeSelect extends _baseComponent.default {
|
|
|
571
571
|
searchPosition,
|
|
572
572
|
searchAutoFocus,
|
|
573
573
|
multiple,
|
|
574
|
-
disabled
|
|
574
|
+
disabled,
|
|
575
|
+
preventScroll
|
|
575
576
|
} = this.props;
|
|
576
577
|
const isDropdownPositionSearch = searchPosition === _constants.strings.SEARCH_POSITION_DROPDOWN;
|
|
577
578
|
const inputcls = (0, _classnames.default)({
|
|
@@ -584,6 +585,7 @@ class TreeSelect extends _baseComponent.default {
|
|
|
584
585
|
const baseInputProps = {
|
|
585
586
|
value: inputValue,
|
|
586
587
|
className: inputcls,
|
|
588
|
+
preventScroll,
|
|
587
589
|
onChange: value => this.search(value)
|
|
588
590
|
};
|
|
589
591
|
const inputDropdownProps = {
|
package/lib/es/badge/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import React, { PureComponent } from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { ContextValue } from '../configProvider/context';
|
|
4
4
|
import '@douyinfe/semi-foundation/lib/es/badge/badge.css';
|
|
5
|
-
export type BadgeType = 'primary' | 'secondary' | 'tertiary' | 'danger' | 'warning';
|
|
5
|
+
export type BadgeType = 'primary' | 'secondary' | 'tertiary' | 'danger' | 'warning' | 'success';
|
|
6
6
|
export type BadgeTheme = 'solid' | 'light' | 'inverted';
|
|
7
7
|
export type BadgePosition = 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom';
|
|
8
8
|
export interface BadgeProps {
|
package/lib/es/cascader/index.js
CHANGED
|
@@ -160,7 +160,7 @@ class Cascader extends BaseComponent {
|
|
|
160
160
|
const renderPlusNChildren = /*#__PURE__*/React.createElement("span", {
|
|
161
161
|
className: plusNCls
|
|
162
162
|
}, "+", hiddenTag.length);
|
|
163
|
-
return showRestTagsPopover
|
|
163
|
+
return showRestTagsPopover ? /*#__PURE__*/React.createElement(Popover, Object.assign({
|
|
164
164
|
content: hiddenTag,
|
|
165
165
|
showArrow: true,
|
|
166
166
|
trigger: "hover",
|
package/lib/es/image/preview.js
CHANGED
|
@@ -17,6 +17,7 @@ import PreviewFoundation from '@douyinfe/semi-foundation/lib/es/image/previewFou
|
|
|
17
17
|
import { getUuidShort } from '@douyinfe/semi-foundation/lib/es/utils/uuid';
|
|
18
18
|
import { cssClasses } from '@douyinfe/semi-foundation/lib/es/image/constants';
|
|
19
19
|
import '@douyinfe/semi-foundation/lib/es/image/image.css';
|
|
20
|
+
import cls from "classnames";
|
|
20
21
|
const prefixCls = cssClasses.PREFIX;
|
|
21
22
|
export default class Preview extends BaseComponent {
|
|
22
23
|
get adapter() {
|
|
@@ -138,10 +139,11 @@ export default class Preview extends BaseComponent {
|
|
|
138
139
|
const _a = this.props,
|
|
139
140
|
{
|
|
140
141
|
src,
|
|
142
|
+
className,
|
|
141
143
|
style,
|
|
142
144
|
lazyLoad
|
|
143
145
|
} = _a,
|
|
144
|
-
restProps = __rest(_a, ["src", "style", "lazyLoad"]);
|
|
146
|
+
restProps = __rest(_a, ["src", "className", "style", "lazyLoad"]);
|
|
145
147
|
const {
|
|
146
148
|
currentIndex,
|
|
147
149
|
visible
|
|
@@ -168,7 +170,7 @@ export default class Preview extends BaseComponent {
|
|
|
168
170
|
}, /*#__PURE__*/React.createElement("div", {
|
|
169
171
|
id: this.previewGroupId,
|
|
170
172
|
style: style,
|
|
171
|
-
className: `${prefixCls}-preview-group
|
|
173
|
+
className: cls(`${prefixCls}-preview-group`, className)
|
|
172
174
|
}, newChildren), /*#__PURE__*/React.createElement(PreviewInner, Object.assign({}, restProps, {
|
|
173
175
|
ref: this.previewRef,
|
|
174
176
|
src: finalSrcList,
|
package/lib/es/input/index.d.ts
CHANGED
|
@@ -168,6 +168,7 @@ declare class Input extends BaseComponent<InputProps, InputState> {
|
|
|
168
168
|
};
|
|
169
169
|
static getDerivedStateFromProps(props: InputProps, state: InputState): Partial<InputState>;
|
|
170
170
|
componentDidUpdate(prevProps: InputProps): void;
|
|
171
|
+
componentDidMount(): void;
|
|
171
172
|
handleClear: (e: React.MouseEvent<HTMLInputElement>) => void;
|
|
172
173
|
handleClick: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
173
174
|
handleMouseOver: (e: React.MouseEvent<HTMLDivElement>) => void;
|
package/lib/es/input/index.js
CHANGED
|
@@ -136,6 +136,21 @@ class Input extends BaseComponent {
|
|
|
136
136
|
this.handleModeChange(mode);
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
+
componentDidMount() {
|
|
140
|
+
// autofocus is changed from the original support of input to the support of manually calling the focus method,
|
|
141
|
+
// so that preventScroll can still take effect under the setting of autofocus
|
|
142
|
+
this.foundation.init();
|
|
143
|
+
const {
|
|
144
|
+
disabled,
|
|
145
|
+
autofocus,
|
|
146
|
+
preventScroll
|
|
147
|
+
} = this.props;
|
|
148
|
+
if (!disabled && autofocus) {
|
|
149
|
+
this.inputRef.current.focus({
|
|
150
|
+
preventScroll
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
}
|
|
139
154
|
renderPrepend() {
|
|
140
155
|
const {
|
|
141
156
|
addonBefore
|
|
@@ -360,7 +375,6 @@ class Input extends BaseComponent {
|
|
|
360
375
|
const inputValue = value === null || value === undefined ? '' : value;
|
|
361
376
|
const inputProps = Object.assign(Object.assign({}, rest), {
|
|
362
377
|
style: inputStyle,
|
|
363
|
-
autoFocus: autofocus,
|
|
364
378
|
className: inputCls,
|
|
365
379
|
disabled,
|
|
366
380
|
readOnly: readonly,
|
|
@@ -174,7 +174,7 @@ export default class Pagination extends BaseComponent {
|
|
|
174
174
|
"aria-label": "Next",
|
|
175
175
|
onClick: e => !isDisabled && this.foundation.goNext(e),
|
|
176
176
|
className: nextClassName,
|
|
177
|
-
"x-semi-prop": "
|
|
177
|
+
"x-semi-prop": "nextText"
|
|
178
178
|
}, nextText || /*#__PURE__*/React.createElement(IconChevronRight, {
|
|
179
179
|
size: "large"
|
|
180
180
|
}));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _noop from "lodash/noop";
|
|
2
|
+
import React, { useRef } from 'react';
|
|
2
3
|
import getUuid from '@douyinfe/semi-foundation/lib/es/utils/uuid';
|
|
3
4
|
import HookToast from './HookToast';
|
|
4
5
|
// const ref = null;
|
|
@@ -28,7 +29,7 @@ function usePatchElement() {
|
|
|
28
29
|
}
|
|
29
30
|
export default function useToast() {
|
|
30
31
|
const [elements, patchElement] = usePatchElement();
|
|
31
|
-
const toastRef = new Map();
|
|
32
|
+
const toastRef = useRef(new Map());
|
|
32
33
|
const addToast = config => {
|
|
33
34
|
const id = getUuid('semi_toast_');
|
|
34
35
|
const mergeConfig = Object.assign(Object.assign({}, config), {
|
|
@@ -36,20 +37,25 @@ export default function useToast() {
|
|
|
36
37
|
});
|
|
37
38
|
// eslint-disable-next-line prefer-const
|
|
38
39
|
let closeFunc;
|
|
39
|
-
const ref = ele => {
|
|
40
|
-
toastRef.set(id, ele);
|
|
41
|
-
};
|
|
42
40
|
const toast = /*#__PURE__*/React.createElement(HookToast, Object.assign({}, mergeConfig, {
|
|
43
41
|
key: id,
|
|
44
42
|
afterClose: instanceId => closeFunc(instanceId),
|
|
45
|
-
ref:
|
|
43
|
+
ref: data => {
|
|
44
|
+
var _a;
|
|
45
|
+
toastRef.current.set(id, {
|
|
46
|
+
close: (_a = data === null || data === void 0 ? void 0 : data.close) !== null && _a !== void 0 ? _a : _noop
|
|
47
|
+
});
|
|
48
|
+
}
|
|
46
49
|
}));
|
|
47
50
|
closeFunc = patchElement(toast, Object.assign({}, mergeConfig));
|
|
48
51
|
return id;
|
|
49
52
|
};
|
|
50
53
|
const removeElement = id => {
|
|
51
|
-
|
|
52
|
-
|
|
54
|
+
var _a;
|
|
55
|
+
const {
|
|
56
|
+
close
|
|
57
|
+
} = (_a = toastRef.current.get(id)) !== null && _a !== void 0 ? _a : {};
|
|
58
|
+
close === null || close === void 0 ? void 0 : close();
|
|
53
59
|
};
|
|
54
60
|
return [{
|
|
55
61
|
success: config => addToast(Object.assign(Object.assign(Object.assign({}, defaultOpts), config), {
|
package/lib/es/tree/index.js
CHANGED
|
@@ -443,8 +443,8 @@ class Tree extends BaseComponent {
|
|
|
443
443
|
notifyChange: value => {
|
|
444
444
|
this.props.onChange && this.props.onChange(value);
|
|
445
445
|
},
|
|
446
|
-
notifySearch: input => {
|
|
447
|
-
this.props.onSearch && this.props.onSearch(input);
|
|
446
|
+
notifySearch: (input, filteredExpandedKeys) => {
|
|
447
|
+
this.props.onSearch && this.props.onSearch(input, filteredExpandedKeys);
|
|
448
448
|
},
|
|
449
449
|
notifyRightClick: (e, node) => {
|
|
450
450
|
this.props.onContextMenu && this.props.onContextMenu(e, node);
|
|
@@ -562,7 +562,8 @@ class TreeSelect extends BaseComponent {
|
|
|
562
562
|
searchPosition,
|
|
563
563
|
searchAutoFocus,
|
|
564
564
|
multiple,
|
|
565
|
-
disabled
|
|
565
|
+
disabled,
|
|
566
|
+
preventScroll
|
|
566
567
|
} = this.props;
|
|
567
568
|
const isDropdownPositionSearch = searchPosition === strings.SEARCH_POSITION_DROPDOWN;
|
|
568
569
|
const inputcls = cls({
|
|
@@ -575,6 +576,7 @@ class TreeSelect extends BaseComponent {
|
|
|
575
576
|
const baseInputProps = {
|
|
576
577
|
value: inputValue,
|
|
577
578
|
className: inputcls,
|
|
579
|
+
preventScroll,
|
|
578
580
|
onChange: value => this.search(value)
|
|
579
581
|
};
|
|
580
582
|
const inputDropdownProps = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.38.0-beta.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es/index.js",
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"lib/*"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@douyinfe/semi-animation": "2.
|
|
21
|
-
"@douyinfe/semi-animation-react": "2.
|
|
22
|
-
"@douyinfe/semi-foundation": "2.
|
|
23
|
-
"@douyinfe/semi-icons": "2.
|
|
24
|
-
"@douyinfe/semi-illustrations": "2.
|
|
25
|
-
"@douyinfe/semi-theme-default": "2.
|
|
20
|
+
"@douyinfe/semi-animation": "2.38.0-beta.0",
|
|
21
|
+
"@douyinfe/semi-animation-react": "2.38.0-beta.0",
|
|
22
|
+
"@douyinfe/semi-foundation": "2.38.0-beta.0",
|
|
23
|
+
"@douyinfe/semi-icons": "2.38.0-beta.0",
|
|
24
|
+
"@douyinfe/semi-illustrations": "2.38.0-beta.0",
|
|
25
|
+
"@douyinfe/semi-theme-default": "2.38.0-beta.0",
|
|
26
26
|
"async-validator": "^3.5.0",
|
|
27
27
|
"classnames": "^2.2.6",
|
|
28
28
|
"copy-text-to-clipboard": "^2.1.1",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
],
|
|
70
70
|
"author": "",
|
|
71
71
|
"license": "MIT",
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "f9fa7bba4ffc5635489ad1687740b336b0395948",
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
75
75
|
"@babel/plugin-transform-runtime": "^7.15.8",
|