@onehat/ui 0.3.353 → 0.3.356
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
|
@@ -694,6 +694,9 @@ export function ComboComponent(props) {
|
|
|
694
694
|
'selectorSelected',
|
|
695
695
|
'usePermissions',
|
|
696
696
|
]);
|
|
697
|
+
if (!Repository) {
|
|
698
|
+
gridProps.data = filteredData;
|
|
699
|
+
}
|
|
697
700
|
const WhichGrid = isEditor ? WindowedGridEditor : Grid;
|
|
698
701
|
grid = <WhichGrid
|
|
699
702
|
showHeaders={false}
|
|
@@ -711,7 +714,6 @@ export function ComboComponent(props) {
|
|
|
711
714
|
}}
|
|
712
715
|
autoAdjustPageSizeToHeight={false}
|
|
713
716
|
{...gridProps}
|
|
714
|
-
data={filteredData}
|
|
715
717
|
reference="grid"
|
|
716
718
|
parent={self}
|
|
717
719
|
h={UiGlobals.mode === UI_MODE_WEB ? styles.FORM_COMBO_MENU_HEIGHT + 'px' : null}
|
|
@@ -778,7 +780,7 @@ export function ComboComponent(props) {
|
|
|
778
780
|
|
|
779
781
|
}}
|
|
780
782
|
onAdd={(selection) => {
|
|
781
|
-
const entity = selection[0];
|
|
783
|
+
const entity = _.isArray(selection) ? selection[0] : selection;
|
|
782
784
|
if (entity.id !== value && !isInTag) {
|
|
783
785
|
// Select it and set the value of the combo.
|
|
784
786
|
setGridSelection(selection);
|
|
@@ -789,7 +791,7 @@ export function ComboComponent(props) {
|
|
|
789
791
|
}
|
|
790
792
|
}}
|
|
791
793
|
onSave={(selection) => {
|
|
792
|
-
const entity = selection[0];
|
|
794
|
+
const entity = _.isArray(selection) ? selection[0] : selection;
|
|
793
795
|
if (!isInTag) {
|
|
794
796
|
if (entity?.id !== value) { // Tag doesn't use value, so don't do this comparison in the Tag
|
|
795
797
|
// Either a phantom record was just solidified into a real record, or a new (non-phantom) record was added.
|
|
@@ -17,15 +17,18 @@ const
|
|
|
17
17
|
height = 50,
|
|
18
18
|
width = 200;
|
|
19
19
|
|
|
20
|
-
// NOTE:
|
|
20
|
+
// NOTE: This component does NOT use the native-base Modal
|
|
21
21
|
// because we need it to appear on top of all other Modals.
|
|
22
22
|
// Therefore, we're using the ReactNative Modal, which at least for web
|
|
23
23
|
// we can control the zIndex of.
|
|
24
24
|
|
|
25
25
|
export default function WaitMessage(props) {
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
let {
|
|
27
|
+
text,
|
|
28
28
|
} = props;
|
|
29
|
+
if (!text) { // do this here instead of setting default value in deconstructor, so we can use the default for text, even if text is defined and passed as null or empty string
|
|
30
|
+
text = 'Please wait...';
|
|
31
|
+
}
|
|
29
32
|
|
|
30
33
|
let transform;
|
|
31
34
|
if (UiGlobals.mode === UI_MODE_WEB) {
|
|
@@ -74,7 +77,7 @@ export default function WaitMessage(props) {
|
|
|
74
77
|
flexDirection="row"
|
|
75
78
|
>
|
|
76
79
|
<Loading minHeight="auto" h={5} w={5} mr={2} />
|
|
77
|
-
<Text color="#000">{
|
|
80
|
+
<Text color="#000">{text}</Text>
|
|
78
81
|
</Box>
|
|
79
82
|
</View>
|
|
80
83
|
</View>
|