@douyinfe/semi-ui 2.46.0-beta.0 → 2.46.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 +9 -9
- 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/calendar/monthCalendar.js +1 -1
- package/lib/cjs/select/index.js +1 -1
- package/lib/cjs/select/utils.js +5 -1
- package/lib/es/calendar/monthCalendar.js +1 -1
- package/lib/es/select/index.js +1 -1
- package/lib/es/select/utils.js +5 -1
- package/package.json +8 -8
package/dist/umd/semi-ui.js
CHANGED
|
@@ -25531,12 +25531,7 @@ class AutoCompleteFoundation extends foundation {
|
|
|
25531
25531
|
// only need persist on react adapter
|
|
25532
25532
|
// https://reactjs.org/docs/legacy-event-pooling.html
|
|
25533
25533
|
this._persistEvent(e);
|
|
25534
|
-
|
|
25535
|
-
// internal-issues:1231
|
|
25536
|
-
setTimeout(() => {
|
|
25537
|
-
this._adapter.notifyBlur(e);
|
|
25538
|
-
// this.closeDropdown();
|
|
25539
|
-
}, 100);
|
|
25534
|
+
this._adapter.notifyBlur(e);
|
|
25540
25535
|
}
|
|
25541
25536
|
}
|
|
25542
25537
|
/* harmony default export */ const autoComplete_foundation = (AutoCompleteFoundation);
|
|
@@ -34603,7 +34598,7 @@ class monthCalendar extends BaseComponent {
|
|
|
34603
34598
|
}
|
|
34604
34599
|
}
|
|
34605
34600
|
if (!isEqual_default()(prevEventKeys, nowEventKeys) || itemLimitUpdate || !isEqual_default()(prevProps.displayValue, this.props.displayValue)) {
|
|
34606
|
-
this.foundation.parseMonthlyEvents(itemLimit
|
|
34601
|
+
this.foundation.parseMonthlyEvents(itemLimit);
|
|
34607
34602
|
}
|
|
34608
34603
|
}
|
|
34609
34604
|
closeCard(e, key) {
|
|
@@ -69907,6 +69902,7 @@ class SelectFoundation extends foundation {
|
|
|
69907
69902
|
delete newOption._show;
|
|
69908
69903
|
delete newOption._selected;
|
|
69909
69904
|
delete newOption._scrollIndex;
|
|
69905
|
+
delete newOption._keyInJsx;
|
|
69910
69906
|
if ('_keyInOptionList' in newOption) {
|
|
69911
69907
|
newOption.key = newOption._keyInOptionList;
|
|
69912
69908
|
delete newOption._keyInOptionList;
|
|
@@ -70292,7 +70288,7 @@ const generateOption = (child, parent, index) => {
|
|
|
70292
70288
|
}
|
|
70293
70289
|
const option = Object.assign(Object.assign({
|
|
70294
70290
|
value: childProps.value,
|
|
70295
|
-
//
|
|
70291
|
+
// Dropdown menu rendering priority label value, children, value in turn downgrade
|
|
70296
70292
|
label: childProps.label || childProps.children || childProps.value,
|
|
70297
70293
|
_show: true,
|
|
70298
70294
|
_selected: false,
|
|
@@ -70300,6 +70296,10 @@ const generateOption = (child, parent, index) => {
|
|
|
70300
70296
|
}, childProps), {
|
|
70301
70297
|
_parentGroup: parent
|
|
70302
70298
|
});
|
|
70299
|
+
// Props are collected from ReactNode, after React.Children.toArray
|
|
70300
|
+
// no need to determine whether the key exists in child
|
|
70301
|
+
// Even if the user does not explicitly declare it, React will always generate a key.
|
|
70302
|
+
option._keyInJsx = child.key;
|
|
70303
70303
|
return option;
|
|
70304
70304
|
};
|
|
70305
70305
|
const getOptionsFromGroup = selectChildren => {
|
|
@@ -71097,7 +71097,7 @@ class Select extends BaseComponent {
|
|
|
71097
71097
|
focused: isFocused,
|
|
71098
71098
|
onMouseEnter: () => this.onOptionHover(optionIndex),
|
|
71099
71099
|
style: optionStyle,
|
|
71100
|
-
key: option.
|
|
71100
|
+
key: option._keyInOptionList || option._keyInJsx || option.label + option.value + optionIndex,
|
|
71101
71101
|
renderOptionItem: renderOptionItem,
|
|
71102
71102
|
inputValue: inputValue,
|
|
71103
71103
|
semiOptionId: `${this.selectID}-option-${optionIndex}`
|