funda-ui 1.1.10 → 1.1.12
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/Select/index.js +2 -2
- package/lib/cjs/Select/index.js +2 -2
- package/lib/esm/Select/index.tsx +2 -2
- package/package.json +1 -1
package/Select/index.js
CHANGED
|
@@ -451,7 +451,7 @@ var Select = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(func
|
|
|
451
451
|
}
|
|
452
452
|
|
|
453
453
|
// Generate list of options
|
|
454
|
-
var selectOptionsList = dataInit.map(function (item, index) {
|
|
454
|
+
var selectOptionsList = Array.isArray(dataInit) ? dataInit.map(function (item, index) {
|
|
455
455
|
if (typeof item.optgroup !== 'undefined') {
|
|
456
456
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("optgroup", {
|
|
457
457
|
key: 'optgroup-' + index,
|
|
@@ -478,7 +478,7 @@ var Select = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(func
|
|
|
478
478
|
disabled: _disabled
|
|
479
479
|
});
|
|
480
480
|
}
|
|
481
|
-
});
|
|
481
|
+
}) : null;
|
|
482
482
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
483
483
|
// data init
|
|
484
484
|
//--------------
|
package/lib/cjs/Select/index.js
CHANGED
|
@@ -451,7 +451,7 @@ var Select = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(func
|
|
|
451
451
|
}
|
|
452
452
|
|
|
453
453
|
// Generate list of options
|
|
454
|
-
var selectOptionsList = dataInit.map(function (item, index) {
|
|
454
|
+
var selectOptionsList = Array.isArray(dataInit) ? dataInit.map(function (item, index) {
|
|
455
455
|
if (typeof item.optgroup !== 'undefined') {
|
|
456
456
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("optgroup", {
|
|
457
457
|
key: 'optgroup-' + index,
|
|
@@ -478,7 +478,7 @@ var Select = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(func
|
|
|
478
478
|
disabled: _disabled
|
|
479
479
|
});
|
|
480
480
|
}
|
|
481
|
-
});
|
|
481
|
+
}) : null;
|
|
482
482
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
483
483
|
// data init
|
|
484
484
|
//--------------
|
package/lib/esm/Select/index.tsx
CHANGED
|
@@ -252,7 +252,7 @@ const Select = forwardRef((props: SelectProps, ref: any) => {
|
|
|
252
252
|
|
|
253
253
|
|
|
254
254
|
// Generate list of options
|
|
255
|
-
const selectOptionsList = dataInit.map((item: any, index: number) => {
|
|
255
|
+
const selectOptionsList = Array.isArray(dataInit) ? dataInit.map((item: any, index: number) => {
|
|
256
256
|
|
|
257
257
|
if (typeof item.optgroup !== 'undefined') {
|
|
258
258
|
return <optgroup key={'optgroup-' + index} label={item.label}>
|
|
@@ -273,7 +273,7 @@ const Select = forwardRef((props: SelectProps, ref: any) => {
|
|
|
273
273
|
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
-
});
|
|
276
|
+
}) : null;
|
|
277
277
|
|
|
278
278
|
|
|
279
279
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"author": "UIUX Lab",
|
|
3
3
|
"email": "uiuxlab@gmail.com",
|
|
4
4
|
"name": "funda-ui",
|
|
5
|
-
"version": "1.1.
|
|
5
|
+
"version": "1.1.12",
|
|
6
6
|
"description": "React components using pure Bootstrap 5+ which does not contain any external style and script libraries.",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|