@fto-consult/expo-ui 8.81.2 → 8.82.0
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/bin/create-app/dependencies.js +39 -39
- package/bin/create-app/eas.json +18 -18
- package/expo-ui.json +10 -10
- package/package.json +2 -2
- package/src/components/Chart/appexChart/appexChart.html +23 -23
- package/src/components/Dropdown/index.js +6 -2
- package/src/components/SimpleSelect/index.js +3 -2
@@ -229,12 +229,16 @@ class DropdownComponent extends AppComponent {
|
|
229
229
|
}
|
230
230
|
this.updateSelected({...nState,data:!this.isBigList?[...this.state.data]: this.state.data,selected,selectedValuesKeys});
|
231
231
|
}
|
232
|
-
compare (value,currentValue
|
232
|
+
compare (value,currentValue){
|
233
233
|
if(this.getValueKey(value) === this.getValueKey(currentValue)) return true;
|
234
234
|
if(typeof this.props.compare =='function'){
|
235
235
|
return this.props.compare(value,currentValue,{context:this,items:this.state.data})
|
236
236
|
}
|
237
|
-
|
237
|
+
if(value === null || value ===""){
|
238
|
+
value = "";
|
239
|
+
}
|
240
|
+
if(currentValue === null || currentValue =="") currentValue = "";
|
241
|
+
return NCompare(value,currentValue);
|
238
242
|
}
|
239
243
|
getCallArgs ({item,items,index,_index,...rest}) {
|
240
244
|
return ({...rest,item,index,_index,counterIndex:_index,index,itemIndex:index,context:this,isDropdown:true,props:this.props,items,selectedColor:this.selectedColor,unselectedColor:theme.colors.text});
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import React from "$react";
|
2
2
|
import {defaultObj,isDecimal,defaultStr,debounce,extendObj,defaultVal,defaultFunc} from "$cutils";
|
3
|
+
import {compare as compareUtil} from "$cutils";
|
3
4
|
import TextField,{flatMode} from "$ecomponents/TextField";
|
4
5
|
import {Pressable,Dimensions,StyleSheet} from "react-native";
|
5
6
|
import { TouchableRipple} from "react-native-paper";
|
@@ -29,7 +30,7 @@ const SimpleSelect = React.forwardRef((props,ref)=>{
|
|
29
30
|
contentContainerProps = defaultObj(contentContainerProps);
|
30
31
|
const prevLayout = React.usePrevious(layout);
|
31
32
|
filter = defaultFunc(filter,x=>true);
|
32
|
-
compare = defaultFunc(compare,
|
33
|
+
compare = defaultFunc(compare,compareUtil);
|
33
34
|
const prevValue = React.usePrevious(value,compare);
|
34
35
|
const selectedRef = React.useRef(undefined);
|
35
36
|
const listRef = React.useRef(null);
|
@@ -89,7 +90,7 @@ const SimpleSelect = React.forwardRef((props,ref)=>{
|
|
89
90
|
return items;
|
90
91
|
},[menuItems])
|
91
92
|
React.useEffect(()=>{
|
92
|
-
if(compare(defaultValue
|
93
|
+
if(compare(defaultValue,value)) return;
|
93
94
|
selectValue(defaultValue);
|
94
95
|
},[defaultValue]);
|
95
96
|
const setSelected = (node,update)=>{
|