@fto-consult/expo-ui 8.83.2 → 8.83.3
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/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fto-consult/expo-ui",
|
3
|
-
"version": "8.83.
|
3
|
+
"version": "8.83.3",
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
5
5
|
"react-native-paper-doc": "https://github.com/callstack/react-native-paper/tree/main/docs/docs/guides",
|
6
6
|
"scripts": {
|
@@ -70,7 +70,7 @@
|
|
70
70
|
"dependencies": {
|
71
71
|
"@emotion/react": "^11.11.1",
|
72
72
|
"@faker-js/faker": "^8.0.2",
|
73
|
-
"@fto-consult/common": "^4.
|
73
|
+
"@fto-consult/common": "^4.52.0",
|
74
74
|
"@fto-consult/expo-ui": "^8.73.1",
|
75
75
|
"apexcharts": "^3.49.0",
|
76
76
|
"file-saver": "^2.0.5",
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from "$react";
|
2
|
-
import {defaultObj,
|
2
|
+
import {defaultObj,defaultStr,debounce,extendObj,defaultVal,defaultFunc} from "$cutils";
|
3
3
|
import {compare as compareUtil} from "$cutils";
|
4
4
|
import TextField,{flatMode} from "$ecomponents/TextField";
|
5
5
|
import {Pressable,Dimensions,StyleSheet} from "react-native";
|
@@ -16,7 +16,7 @@ import {isDesktopMedia} from "$cplatform/dimensions";
|
|
16
16
|
import { matchOperators,getSearchTimeout,canAutoFocusSearchField} from "$ecomponents/Dropdown/utils";
|
17
17
|
import Dialog from "$ecomponents/Dialog";
|
18
18
|
|
19
|
-
const isValidValue =(value)=> typeof value === "string" || typeof value === "number" || isObj(value) || Array.isArray(value);
|
19
|
+
const isValidValue =(value)=> typeof value === "string" || typeof value === "number" || typeof value =="boolean" || isObj(value) || Array.isArray(value);
|
20
20
|
|
21
21
|
const SimpleSelect = React.forwardRef((props,ref)=>{
|
22
22
|
let {style : customStyle,onMount,mode,showSearch,anchorContainerProps,renderText,contentContainerProps,withCheckedIcon,testID,selectionColor,dialogProps,onShow,anchor,onUnmont,controlled:cr,onDismiss,visible:controlledVisible,selectedColor,inputProps,itemProps,itemContainerProps,label,listProps,readOnly,text,filter,renderItem,itemValue,getItemValue,defaultValue,items:menuItems,onPress,onChange,disabled,...rest} = props;
|
@@ -61,8 +61,8 @@ const SimpleSelect = React.forwardRef((props,ref)=>{
|
|
61
61
|
Object.map(menuItems,(item,index,_index)=>{
|
62
62
|
if(React.isValidElement(item) || !filter({items:menuItems,item,_index,index})) return null;
|
63
63
|
if(!isObj(item)) {
|
64
|
-
if(
|
65
|
-
item = {label:item
|
64
|
+
if(isValidValue(item)){
|
65
|
+
item = {label:String(item),code:item};
|
66
66
|
} else return null;
|
67
67
|
}
|
68
68
|
const backupItem = item;
|
@@ -77,7 +77,7 @@ const SimpleSelect = React.forwardRef((props,ref)=>{
|
|
77
77
|
if(!content && typeof content != "number"){
|
78
78
|
content = rText;
|
79
79
|
}
|
80
|
-
if(
|
80
|
+
if(typeof content !="string") content = String(content);
|
81
81
|
if(!React.isValidElement(content,true)) {
|
82
82
|
console.warn("Simple select, invalid meuitem content: ",content,mItem,props);
|
83
83
|
return null;
|