x-ui-design 0.8.68 → 0.8.69

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/index.esm.js CHANGED
@@ -5577,10 +5577,12 @@ const Popover = ({
5577
5577
  }
5578
5578
  return Children.map(children, (child, index) => {
5579
5579
  if (! /*#__PURE__*/isValidElement(child)) {
5580
- child = /*#__PURE__*/React.createElement("div", null, child);
5580
+ child = /*#__PURE__*/React.createElement("div", {
5581
+ key: index ?? `popover-child-${index}`
5582
+ }, child);
5581
5583
  }
5582
5584
  return /*#__PURE__*/cloneElement(child, {
5583
- key: index,
5585
+ key: index ?? `popover-child-${index}`,
5584
5586
  ...{
5585
5587
  style,
5586
5588
  ...childProps,
@@ -5590,6 +5592,7 @@ const Popover = ({
5590
5592
  });
5591
5593
  });
5592
5594
  }, [children, style]);
5595
+ const _content = useMemo(() => flattenChildren(content), [content]);
5593
5596
  return /*#__PURE__*/React.createElement(React.Fragment, null, _children, isOpen && /*#__PURE__*/React.createElement(ConditionalWrapper, {
5594
5597
  condition: !!getPopupContainer,
5595
5598
  wrapper: element => getPopupContainer ? /*#__PURE__*/createPortal(element, getPopupContainer(triggerRef.current)) : /*#__PURE__*/React.createElement(React.Fragment, null, element)
@@ -5607,7 +5610,9 @@ const Popover = ({
5607
5610
  className: `${prefixCls}-title`
5608
5611
  }, title), /*#__PURE__*/React.createElement("div", {
5609
5612
  className: `${prefixCls}-inner`
5610
- }, content), /*#__PURE__*/React.createElement("div", {
5613
+ }, Children.map(_content, (child, index) => /*#__PURE__*/React.createElement("div", {
5614
+ key: index
5615
+ }, child))), /*#__PURE__*/React.createElement("div", {
5611
5616
  className: `${prefixCls}-arrow ${showPlacement}`
5612
5617
  }))));
5613
5618
  };