x-ui-design 0.4.21 → 0.4.23
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 +2 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/lib/components/Input/style.css +1 -1
- package/lib/components/Select/Select.tsx +1 -1
- package/package.json +1 -1
- package/src/app/page.tsx +4 -19
|
@@ -466,7 +466,7 @@ const SelectComponent = forwardRef<HTMLDivElement, SelectProps>(
|
|
|
466
466
|
}, [showArrow, showSearch, isOpen, suffixIcon, searchIcon]);
|
|
467
467
|
|
|
468
468
|
const extractedOptions = children
|
|
469
|
-
? extractOptions(children)
|
|
469
|
+
? Array.isArray(children) && !isValidElement(children[0]) ? children : extractOptions(children)
|
|
470
470
|
: Array.isArray(options) ? options : [];
|
|
471
471
|
|
|
472
472
|
const triggerNode = useMemo(() => {
|
package/package.json
CHANGED
package/src/app/page.tsx
CHANGED
|
@@ -11,20 +11,11 @@ import { Switch } from "../../lib/components/Switch";
|
|
|
11
11
|
import { Suspense, useCallback, useState } from "react";
|
|
12
12
|
import { lazy } from '../../lib/utils/lazy'
|
|
13
13
|
import { Button } from "../../lib/components/Button";
|
|
14
|
-
|
|
15
|
-
// import Option from "../../lib/components/Select/Option/Option";
|
|
14
|
+
import Option from "../../lib/components/Select/Option/Option";
|
|
16
15
|
|
|
17
16
|
// import { Form as AntForm, Select as AntSelect } from 'antd'
|
|
18
17
|
// import FormItem from "antd/es/form/FormItem";
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
const Option = lazy(
|
|
22
|
-
() =>
|
|
23
|
-
import(
|
|
24
|
-
/* webpackChunkName: "option" */ '../../lib/components/Select/Option/Option'
|
|
25
|
-
)
|
|
26
|
-
);
|
|
27
|
-
|
|
28
19
|
export const CountryCodes = [...new Set([
|
|
29
20
|
{
|
|
30
21
|
"label": "Afghanistan",
|
|
@@ -1925,15 +1916,9 @@ export default function Home() {
|
|
|
1925
1916
|
onSearch={e => setValue(e)}
|
|
1926
1917
|
showSearch
|
|
1927
1918
|
placeholder="Select...">
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
<div>
|
|
1932
|
-
{o.label}
|
|
1933
|
-
</div>
|
|
1934
|
-
</Option>
|
|
1935
|
-
</Suspense>
|
|
1936
|
-
))}
|
|
1919
|
+
{(options || []).map(o => {
|
|
1920
|
+
return <Option key={o.value} value={o.value}>{o.label}</Option>
|
|
1921
|
+
})}
|
|
1937
1922
|
</Select>
|
|
1938
1923
|
</div>
|
|
1939
1924
|
</Item>
|