@applicaster/zapp-react-native-utils 13.0.0-rc.40 → 13.0.0-rc.41
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/focusManager/FocusManager.ts +10 -1
- package/package.json +2 -2
|
@@ -250,7 +250,10 @@ class FocusManager {
|
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
onDisableFocusChange = (id) => {
|
|
253
|
-
if (
|
|
253
|
+
if (
|
|
254
|
+
FocusManager.instance.isFocused(id) ||
|
|
255
|
+
FocusManager.instance.hasFocusedChildren(id)
|
|
256
|
+
) {
|
|
254
257
|
// Move focus to next one
|
|
255
258
|
const nextFocus = FocusManager.instance.focused?.props
|
|
256
259
|
?.nextFocusDown as string;
|
|
@@ -267,6 +270,12 @@ class FocusManager {
|
|
|
267
270
|
}
|
|
268
271
|
};
|
|
269
272
|
|
|
273
|
+
hasFocusedChildren = (id) => {
|
|
274
|
+
return this.tree
|
|
275
|
+
.find(id)
|
|
276
|
+
?.children?.some((item) => item?.id === this.focusedId);
|
|
277
|
+
};
|
|
278
|
+
|
|
270
279
|
setFocus(
|
|
271
280
|
newFocus: FocusManager.TouchableReactRef | string,
|
|
272
281
|
options?: FocusManager.Android.CallbackOptions
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-utils",
|
|
3
|
-
"version": "13.0.0-rc.
|
|
3
|
+
"version": "13.0.0-rc.41",
|
|
4
4
|
"description": "Applicaster Zapp React Native utilities package",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@applicaster/applicaster-types": "13.0.0-rc.
|
|
31
|
+
"@applicaster/applicaster-types": "13.0.0-rc.41",
|
|
32
32
|
"buffer": "^5.2.1",
|
|
33
33
|
"camelize": "^1.0.0",
|
|
34
34
|
"create-react-context": "^0.2.3",
|