@douyinfe/semi-ui 2.37.0-beta.0 → 2.37.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/umd/semi-ui.js +19 -2
- 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/input/index.d.ts +1 -0
- package/lib/cjs/input/index.js +15 -1
- package/lib/cjs/treeSelect/index.js +3 -1
- package/lib/es/input/index.d.ts +1 -0
- package/lib/es/input/index.js +15 -1
- package/lib/es/treeSelect/index.js +3 -1
- package/package.json +8 -8
package/dist/umd/semi-ui.js
CHANGED
|
@@ -27724,6 +27724,21 @@ class Input extends BaseComponent {
|
|
|
27724
27724
|
this.handleModeChange(mode);
|
|
27725
27725
|
}
|
|
27726
27726
|
}
|
|
27727
|
+
componentDidMount() {
|
|
27728
|
+
// autofocus is changed from the original support of input to the support of manually calling the focus method,
|
|
27729
|
+
// so that preventScroll can still take effect under the setting of autofocus
|
|
27730
|
+
this.foundation.init();
|
|
27731
|
+
const {
|
|
27732
|
+
disabled,
|
|
27733
|
+
autofocus,
|
|
27734
|
+
preventScroll
|
|
27735
|
+
} = this.props;
|
|
27736
|
+
if (!disabled && autofocus) {
|
|
27737
|
+
this.inputRef.current.focus({
|
|
27738
|
+
preventScroll
|
|
27739
|
+
});
|
|
27740
|
+
}
|
|
27741
|
+
}
|
|
27727
27742
|
renderPrepend() {
|
|
27728
27743
|
const {
|
|
27729
27744
|
addonBefore
|
|
@@ -27948,7 +27963,6 @@ class Input extends BaseComponent {
|
|
|
27948
27963
|
const inputValue = value === null || value === undefined ? '' : value;
|
|
27949
27964
|
const inputProps = Object.assign(Object.assign({}, rest), {
|
|
27950
27965
|
style: inputStyle,
|
|
27951
|
-
autoFocus: autofocus,
|
|
27952
27966
|
className: inputCls,
|
|
27953
27967
|
disabled,
|
|
27954
27968
|
readOnly: readonly,
|
|
@@ -87935,7 +87949,8 @@ class TreeSelect extends BaseComponent {
|
|
|
87935
87949
|
searchPosition,
|
|
87936
87950
|
searchAutoFocus,
|
|
87937
87951
|
multiple,
|
|
87938
|
-
disabled
|
|
87952
|
+
disabled,
|
|
87953
|
+
preventScroll
|
|
87939
87954
|
} = this.props;
|
|
87940
87955
|
const isDropdownPositionSearch = searchPosition === treeSelect_constants_strings.SEARCH_POSITION_DROPDOWN;
|
|
87941
87956
|
const inputcls = classnames_default()({
|
|
@@ -87948,6 +87963,7 @@ class TreeSelect extends BaseComponent {
|
|
|
87948
87963
|
const baseInputProps = {
|
|
87949
87964
|
value: inputValue,
|
|
87950
87965
|
className: inputcls,
|
|
87966
|
+
preventScroll,
|
|
87951
87967
|
onChange: value => this.search(value)
|
|
87952
87968
|
};
|
|
87953
87969
|
const inputDropdownProps = {
|
|
@@ -89322,6 +89338,7 @@ class UploadFoundation extends foundation {
|
|
|
89322
89338
|
newFileList[index].fileInstance = fileInstance;
|
|
89323
89339
|
newFileList[index].size = getFileSize(fileInstance.size);
|
|
89324
89340
|
newFileList[index].name = fileInstance.name;
|
|
89341
|
+
newFileList[index].url = this._createURL(fileInstance);
|
|
89325
89342
|
}
|
|
89326
89343
|
newFileList[index].shouldUpload = shouldUpload;
|
|
89327
89344
|
}
|