@applicaster/zapp-react-native-ui-components 12.0.0-rc.134 → 12.0.0-rc.136
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.
|
@@ -66,20 +66,26 @@ export function ActionButton(props: Props) {
|
|
|
66
66
|
);
|
|
67
67
|
|
|
68
68
|
useEffect(() => {
|
|
69
|
-
if (actionDisabled || !actionContext)
|
|
69
|
+
if ((actionDisabled || !actionContext) && actionState !== null) {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
70
72
|
|
|
71
73
|
setActionState(actionContext.initialEntryState(item));
|
|
72
|
-
}, [actionDisabled, item?.id, actionContext]);
|
|
74
|
+
}, [actionDisabled, item?.id, actionContext, action]);
|
|
73
75
|
|
|
74
76
|
const onPress = useCallback(() => {
|
|
75
77
|
actionContext.invokeAction(item, {
|
|
76
|
-
updateState:
|
|
78
|
+
updateState: (state) => {
|
|
79
|
+
setActionState(state);
|
|
80
|
+
},
|
|
77
81
|
});
|
|
78
|
-
}, [actionState, actionContext?.state,
|
|
82
|
+
}, [actionState, actionContext?.state, item?.id]);
|
|
79
83
|
|
|
80
84
|
useEffect(() => {
|
|
81
85
|
if (typeof actionContext?.addListener === "function") {
|
|
82
|
-
return actionContext?.addListener(item.id as string,
|
|
86
|
+
return actionContext?.addListener(item.id as string, (state) => {
|
|
87
|
+
setActionState(state);
|
|
88
|
+
});
|
|
83
89
|
}
|
|
84
90
|
}, [item?.id]);
|
|
85
91
|
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
ifElseFocusedSelected,
|
|
4
4
|
ifElseSelected,
|
|
5
5
|
} from "@applicaster/zapp-react-native-utils/cellUtils";
|
|
6
|
+
import { platformSelect } from "@applicaster/zapp-react-native-utils/reactUtils";
|
|
6
7
|
|
|
7
8
|
import { getPositionStyles } from "./utils";
|
|
8
9
|
|
|
@@ -31,7 +32,11 @@ export const CellBadge = ({
|
|
|
31
32
|
return {
|
|
32
33
|
type: View, // Cell badge view
|
|
33
34
|
style: {
|
|
34
|
-
flex:
|
|
35
|
+
flex: platformSelect({
|
|
36
|
+
tvos: 0,
|
|
37
|
+
android_tv: 0,
|
|
38
|
+
default: 1,
|
|
39
|
+
}),
|
|
35
40
|
position: "absolute",
|
|
36
41
|
...getPositionStyles(position, {
|
|
37
42
|
width: value("cell_badge_width"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-ui-components",
|
|
3
|
-
"version": "12.0.0-rc.
|
|
3
|
+
"version": "12.0.0-rc.136",
|
|
4
4
|
"description": "Applicaster Zapp React Native ui components for the Quick Brick App",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"redux-mock-store": "^1.5.3"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@applicaster/applicaster-types": "12.0.0-rc.
|
|
38
|
-
"@applicaster/zapp-react-native-bridge": "12.0.0-rc.
|
|
39
|
-
"@applicaster/zapp-react-native-redux": "12.0.0-rc.
|
|
40
|
-
"@applicaster/zapp-react-native-utils": "12.0.0-rc.
|
|
37
|
+
"@applicaster/applicaster-types": "12.0.0-rc.136",
|
|
38
|
+
"@applicaster/zapp-react-native-bridge": "12.0.0-rc.136",
|
|
39
|
+
"@applicaster/zapp-react-native-redux": "12.0.0-rc.136",
|
|
40
|
+
"@applicaster/zapp-react-native-utils": "12.0.0-rc.136",
|
|
41
41
|
"promise": "^8.3.0",
|
|
42
42
|
"react-router-native": "^5.1.2",
|
|
43
43
|
"url": "^0.11.0",
|