@douyinfe/semi-ui 2.46.0-beta.0 → 2.46.1

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.
@@ -356,7 +356,7 @@ class monthCalendar extends _baseComponent.default {
356
356
  }
357
357
  }
358
358
  if (!(0, _isEqual2.default)(prevEventKeys, nowEventKeys) || itemLimitUpdate || !(0, _isEqual2.default)(prevProps.displayValue, this.props.displayValue)) {
359
- this.foundation.parseMonthlyEvents(itemLimit || this.props.events);
359
+ this.foundation.parseMonthlyEvents(itemLimit);
360
360
  }
361
361
  }
362
362
  closeCard(e, key) {
@@ -210,7 +210,8 @@ class Pagination extends _baseComponent.default {
210
210
  const {
211
211
  showSizeChanger,
212
212
  popoverPosition = defaultPopoverPosition,
213
- disabled
213
+ disabled,
214
+ popoverZIndex
214
215
  } = this.props;
215
216
  const {
216
217
  pageSize
@@ -236,6 +237,7 @@ class Pagination extends _baseComponent.default {
236
237
  key: pageSize,
237
238
  position: popoverPosition || 'bottomRight',
238
239
  clickToHide: true,
240
+ zIndex: popoverZIndex,
239
241
  dropdownClassName: `${prefixCls}-select-dropdown`
240
242
  }, options));
241
243
  }
@@ -530,7 +530,7 @@ class Select extends _baseComponent.default {
530
530
  focused: isFocused,
531
531
  onMouseEnter: () => this.onOptionHover(optionIndex),
532
532
  style: optionStyle,
533
- key: option.key || option.label + option.value + optionIndex,
533
+ key: option._keyInOptionList || option._keyInJsx || option.label + option.value + optionIndex,
534
534
  renderOptionItem: renderOptionItem,
535
535
  inputValue: inputValue,
536
536
  semiOptionId: `${this.selectID}-option-${optionIndex}`
@@ -22,7 +22,7 @@ const generateOption = (child, parent, index) => {
22
22
  }
23
23
  const option = Object.assign(Object.assign({
24
24
  value: childProps.value,
25
- // Drop-down menu rendering priority label value, children, value in turn downgrade
25
+ // Dropdown menu rendering priority label value, children, value in turn downgrade
26
26
  label: childProps.label || childProps.children || childProps.value,
27
27
  _show: true,
28
28
  _selected: false,
@@ -30,6 +30,10 @@ const generateOption = (child, parent, index) => {
30
30
  }, childProps), {
31
31
  _parentGroup: parent
32
32
  });
33
+ // Props are collected from ReactNode, after React.Children.toArray
34
+ // no need to determine whether the key exists in child
35
+ // Even if the user does not explicitly declare it, React will always generate a key.
36
+ option._keyInJsx = child.key;
33
37
  return option;
34
38
  };
35
39
  exports.generateOption = generateOption;
@@ -348,7 +348,7 @@ export default class monthCalendar extends BaseComponent {
348
348
  }
349
349
  }
350
350
  if (!_isEqual(prevEventKeys, nowEventKeys) || itemLimitUpdate || !_isEqual(prevProps.displayValue, this.props.displayValue)) {
351
- this.foundation.parseMonthlyEvents(itemLimit || this.props.events);
351
+ this.foundation.parseMonthlyEvents(itemLimit);
352
352
  }
353
353
  }
354
354
  closeCard(e, key) {
@@ -202,7 +202,8 @@ export default class Pagination extends BaseComponent {
202
202
  const {
203
203
  showSizeChanger,
204
204
  popoverPosition = defaultPopoverPosition,
205
- disabled
205
+ disabled,
206
+ popoverZIndex
206
207
  } = this.props;
207
208
  const {
208
209
  pageSize
@@ -228,6 +229,7 @@ export default class Pagination extends BaseComponent {
228
229
  key: pageSize,
229
230
  position: popoverPosition || 'bottomRight',
230
231
  clickToHide: true,
232
+ zIndex: popoverZIndex,
231
233
  dropdownClassName: `${prefixCls}-select-dropdown`
232
234
  }, options));
233
235
  }
@@ -521,7 +521,7 @@ class Select extends BaseComponent {
521
521
  focused: isFocused,
522
522
  onMouseEnter: () => this.onOptionHover(optionIndex),
523
523
  style: optionStyle,
524
- key: option.key || option.label + option.value + optionIndex,
524
+ key: option._keyInOptionList || option._keyInJsx || option.label + option.value + optionIndex,
525
525
  renderOptionItem: renderOptionItem,
526
526
  inputValue: inputValue,
527
527
  semiOptionId: `${this.selectID}-option-${optionIndex}`
@@ -15,7 +15,7 @@ const generateOption = (child, parent, index) => {
15
15
  }
16
16
  const option = Object.assign(Object.assign({
17
17
  value: childProps.value,
18
- // Drop-down menu rendering priority label value, children, value in turn downgrade
18
+ // Dropdown menu rendering priority label value, children, value in turn downgrade
19
19
  label: childProps.label || childProps.children || childProps.value,
20
20
  _show: true,
21
21
  _selected: false,
@@ -23,6 +23,10 @@ const generateOption = (child, parent, index) => {
23
23
  }, childProps), {
24
24
  _parentGroup: parent
25
25
  });
26
+ // Props are collected from ReactNode, after React.Children.toArray
27
+ // no need to determine whether the key exists in child
28
+ // Even if the user does not explicitly declare it, React will always generate a key.
29
+ option._keyInJsx = child.key;
26
30
  return option;
27
31
  };
28
32
  const getOptionsFromGroup = selectChildren => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-ui",
3
- "version": "2.46.0-beta.0",
3
+ "version": "2.46.1",
4
4
  "description": "A modern, comprehensive, flexible design system and UI library. Connect DesignOps & DevOps. Quickly build beautiful React apps. Maintained by Douyin-fe team.",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es/index.js",
@@ -20,12 +20,12 @@
20
20
  "@dnd-kit/core": "^6.0.8",
21
21
  "@dnd-kit/sortable": "^7.0.2",
22
22
  "@dnd-kit/utilities": "^3.2.1",
23
- "@douyinfe/semi-animation": "2.46.0-beta.0",
24
- "@douyinfe/semi-animation-react": "2.46.0-beta.0",
25
- "@douyinfe/semi-foundation": "2.46.0-beta.0",
26
- "@douyinfe/semi-icons": "2.46.0-beta.0",
27
- "@douyinfe/semi-illustrations": "2.46.0-beta.0",
28
- "@douyinfe/semi-theme-default": "2.46.0-beta.0",
23
+ "@douyinfe/semi-animation": "2.46.1",
24
+ "@douyinfe/semi-animation-react": "2.46.1",
25
+ "@douyinfe/semi-foundation": "2.46.1",
26
+ "@douyinfe/semi-icons": "2.46.1",
27
+ "@douyinfe/semi-illustrations": "2.46.1",
28
+ "@douyinfe/semi-theme-default": "2.46.1",
29
29
  "async-validator": "^3.5.0",
30
30
  "classnames": "^2.2.6",
31
31
  "copy-text-to-clipboard": "^2.1.1",
@@ -75,7 +75,7 @@
75
75
  ],
76
76
  "author": "",
77
77
  "license": "MIT",
78
- "gitHead": "ecce44f71f5c592685055bb2ec9c0ccb3519538d",
78
+ "gitHead": "11cc57786fbf20f83242a7ccebf62c8874f03057",
79
79
  "devDependencies": {
80
80
  "@babel/plugin-proposal-decorators": "^7.15.8",
81
81
  "@babel/plugin-transform-runtime": "^7.15.8",