x-ui-design 0.4.24 → 0.4.25
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 +3 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/lib/components/Select/Select.tsx +5 -1
- package/lib/helpers/flatten.ts +4 -1
- package/package.json +1 -1
- package/src/app/page.tsx +2 -5
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import require$$1 from 'react/jsx-runtime';
|
|
2
|
-
import React, { useRef, useState, isValidElement,
|
|
2
|
+
import React, { useRef, useState, isValidElement, Fragment, Suspense, Children, useContext, useMemo, useEffect, createContext, forwardRef, useImperativeHandle, useCallback } from 'react';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
4
|
import ReactDOMServer from 'react-dom/server';
|
|
5
5
|
|
|
@@ -907,7 +907,7 @@ function clsx(...args) {
|
|
|
907
907
|
|
|
908
908
|
function flattenChildren(children) {
|
|
909
909
|
const result = [];
|
|
910
|
-
if (Array.isArray(children) && ! /*#__PURE__*/isValidElement(children[0])) {
|
|
910
|
+
if (Array.isArray(children) && ! /*#__PURE__*/isValidElement(children[0]) && !(children[0].type === Fragment || children[0].type === Suspense)) {
|
|
911
911
|
return children;
|
|
912
912
|
}
|
|
913
913
|
Children.forEach(children, child => {
|
|
@@ -3427,7 +3427,7 @@ const SelectComponent = /*#__PURE__*/forwardRef(({
|
|
|
3427
3427
|
isOpen: isOpen
|
|
3428
3428
|
}));
|
|
3429
3429
|
}, [showArrow, showSearch, isOpen, suffixIcon, searchIcon]);
|
|
3430
|
-
const extractedOptions = children ? Array.isArray(children) && ! /*#__PURE__*/isValidElement(children[0]) ? children : extractOptions(children) : Array.isArray(options) ? options : [];
|
|
3430
|
+
const extractedOptions = children ? Array.isArray(children) && ! /*#__PURE__*/isValidElement(children[0]) && !(children[0]?.type === Fragment || children[0]?.type === Suspense) ? children : extractOptions(children) : Array.isArray(options) ? options : [];
|
|
3431
3431
|
const triggerNode = useMemo(() => {
|
|
3432
3432
|
return selectRef.current?.querySelector(`.${prefixCls}-trigger`);
|
|
3433
3433
|
}, [prefixCls]);
|