Skip to content

Commit 5befbf7

Browse files
authored
[MOO-1942]: IntroScreen with conditional visibility not rendering (#399)
2 parents 2d6e57c + 5052af5 commit 5befbf7

File tree

6 files changed

+16
-1565
lines changed

6 files changed

+16
-1565
lines changed

packages/pluggableWidgets/intro-screen-native/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
### Fixed
10+
- We fixed an issue where using the conditional visibility on the IntroScreen would cause the widget not to render.
11+
912
## [4.1.0] - 2025-9-9
1013

1114
### Fixed

packages/pluggableWidgets/intro-screen-native/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "intro-screen-native",
33
"widgetName": "IntroScreen",
4-
"version": "4.1.0",
4+
"version": "4.1.1",
55
"license": "Apache-2.0",
66
"repository": {
77
"type": "git",

packages/pluggableWidgets/intro-screen-native/src/IntroScreen.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { createElement, useCallback, useEffect, useState } from "react";
22
import { defaultWelcomeScreenStyle, IntroScreenStyle } from "./ui/Styles";
33
import { IntroScreenProps } from "../typings/IntroScreenProps";
4-
import { Modal, View } from "react-native";
4+
import { InteractionManager, Modal, View } from "react-native";
55
import { DynamicValue, ValueStatus } from "mendix";
66
import { SwipeableContainer } from "./SwipeableContainer";
77
import AsyncStorage from "@react-native-async-storage/async-storage";
@@ -22,15 +22,15 @@ export function IntroScreen(props: IntroScreenProps<IntroScreenStyle>): JSX.Elem
2222
setVisible(value === "" || value === null);
2323
});
2424
} else {
25-
setVisible(true);
25+
InteractionManager.runAfterInteractions(() => setVisible(true));
2626
}
2727
}, [props.identifier]);
2828

2929
const hideModal = useCallback((): void => {
3030
if (props.identifier) {
3131
AsyncStorage.setItem(props.identifier, "gone").then(() => setVisible(false));
3232
} else {
33-
setVisible(false);
33+
InteractionManager.runAfterInteractions(() => setVisible(false));
3434
}
3535
}, [props.identifier]);
3636

0 commit comments

Comments
 (0)