@fto-consult/expo-ui 6.87.0 → 6.87.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
@@ -114,19 +114,21 @@ const TableDataSelectField = React.forwardRef(({foreignKeyColumn,foreignKeyLabel
|
|
114
114
|
}
|
115
115
|
const hasRefreshedRef = React.useRef(false);
|
116
116
|
React.useEffect(()=>{
|
117
|
-
|
118
|
-
|
119
|
-
const onUpsertData = ()=>{return isMounted()?context.refresh():undefined};
|
120
|
-
APP.on(actions.upsert(foreignKeyTable),onUpsertData);
|
121
|
-
APP.on(actions.onRemove(foreignKeyTable),onUpsertData);
|
122
|
-
return ()=>{
|
123
|
-
APP.off(actions.upsert(foreignKeyTable),onUpsertData);
|
124
|
-
APP.off(actions.onRemove(foreignKeyTable),onUpsertData);
|
125
|
-
};
|
117
|
+
if(bindUpsert2RemoveEvents === false || !(foreignKeyTableStr)){
|
118
|
+
return ()=>{}
|
126
119
|
}
|
120
|
+
const onUpsertData = ()=>{
|
121
|
+
return isMounted()?context.refresh():undefined
|
122
|
+
};
|
123
|
+
APP.on(actions.upsert(foreignKeyTableStr),onUpsertData);
|
124
|
+
APP.on(actions.onRemove(foreignKeyTableStr),onUpsertData);
|
127
125
|
return ()=>{
|
128
|
-
|
129
|
-
|
126
|
+
APP.off(actions.upsert(foreignKeyTableStr),onUpsertData);
|
127
|
+
APP.off(actions.onRemove(foreignKeyTableStr),onUpsertData);
|
128
|
+
};
|
129
|
+
},[foreignKeyTableStr,bindUpsert2RemoveEvents])
|
130
|
+
React.useEffect(()=>{
|
131
|
+
context.refresh();
|
130
132
|
},[]);
|
131
133
|
|
132
134
|
let dat = isNonNullString(foreignKeyColumnValue)? {
|