EdgeNavigator loading data from fetch

Fuse Version: 0.27.1
OS: Windows 10

Issue is at first time, it works fine but when i logout and logback in. it still makes an api call, receives the response but is not showing anymore in the edgenavigator, When i reset the emulator works fine again… but when i use static data works fine even when i logout and log back in no reset needed, navigation used is router.goto(“login”), router.goto(“home”);

EdgeNavigator Code

<EdgeNavigator ux:Name="EdgeNavigator" HitTestMode="LocalBoundsAndChildren"> 
        <DockPanel ux:Name="Sidebar" Background="#212121" Width="200" EdgeNavigation.Edge="Left">
            <DropShadow />
            <ActivatingAnimation>
                <Change mainAppTranslation.X="200" />
                <!-- Change to cross out -->
                <Change topMenuTranslation.Y="0" />
                <Change bottomMenuTranslation.Y="0" />
                <Change middleRectangle.Opacity="0" Easing="CircularOut" />
                <Change topMenuRotation.Degrees="45" Easing="ExponentialIn" />
                <Change bottomMenuRotation.Degrees="-45" Easing="ExponentialIn" />
                <Change topRectangle.Width="28" />
                <Change bottomRectangle.Width="28" />
            </ActivatingAnimation>
            <Panel Dock="Top" Margin="0,20,0,0">
                <!-- <Tag77LogoWhite /> -->
                <StackPanel> 
                    <Image Url="https://tag77.com/image/user/31601" StretchMode="UniformToFill" Margin="10"/>
                    <StackPanel Margin="0,10,0,10" Orientation="Horizontal">
                        <Text Value="31601 : Dione Llorera" Color="#fff" Alignment="Left" Margin="10,0,10,0" Font="LatoRegular" FontSize="15"/>  
                        </Text> -->
                    </StackPanel>
                    <Panel Dock="Top" ClipToBounds="true"  ux:Name="communitiesPanel" BoxSizing="Limit" LimitHeight="100%" Margin="10,0,10,0">
                        <DockPanel>
                            Issue is here when i use static data it works fine as it should be but when i wait for the data from api
                           <Text Dock="Top" Value="Comm 1" Color="#fff" Clicked="{switchPerspective}" />
                           <Text Dock="Top" Value="Comm 2" Color="#fff" Clicked="{switchPerspective}" />
                            <Each Items="{communityData}">
                                <Text Dock="Top" Value="{community_name}" Color="#fff" Clicked="{switchPerspective}" />
                            </Each>
                        </DockPanel>
                         
                    </Panel> 
                    <Rectangle Height="1" Fill="#d3d3d3" Margin="10,0,10,0"/>
                </StackPanel>
                
            </Panel>
            
            <Grid ColumnCount="2" Dock="Bottom" Padding="5,5,5,5" Background="#BE3A31" Margin="0,10,0,10" Clicked="{logout}">
                <Text Value="LOGOUT" Column="0" TextColor="#fff" Alignment="Center" />
                <Image Source="ic_exit" Column="1" MaxHeight="30"/>
            </Grid>
            <StackPanel ux:Name="navigate" Orientation="Vertical" Margin="0,20,0,10">
                <MenuButton ux:Name="btn_page1" Text ="MY WALLET" Clicked="{set_page_1}" Visibility="Collapsed" />
                <MenuButton ux:Name="btn_page2" Text ="EVENTS" Clicked="{set_page_2}" Visibility="Hidden"/>
                <MenuButton ux:Name="btn_page3" Text ="COMMUNITIES" Clicked="{set_page_3}" Visibility="Collapsed"/>
                <MenuButton ux:Name="btn_page4" Text ="CONTACTS" Clicked="{set_page_4}" Visibility="Collapsed"/>
            </StackPanel>
        </DockPanel>
        <DockPanel> 
            <Translation ux:Name="mainAppTranslation" />
            <iOS.StatusBarConfig Style="Light" Animation="Slide"/>
            <Android.StatusBarConfig IsVisible="false"/>
            <BottomFrameBackground Dock="Bottom" />
            <StackPanel Dock="Top" Background="#bdc3c7">
                <Grid Columns="auto,1*,auto"  Background="#424242">
                    <Panel Margin="7,5,5,5" Height="40" Width="40" HitTestMode="LocalBounds">
                        <Clicked>
                            <Set EdgeNavigator.Active="Sidebar" />
                        </Clicked>
                        <Rectangle ux:Name="topRectangle" Height="2" Width="26" Fill="#eee">
                            <Translation Y="-9" ux:Name="topMenuTranslation" />
                            <Rotation ux:Name="topMenuRotation" />
                        </Rectangle>
                        <Rectangle ux:Name="middleRectangle" Height="2" Width="26" Fill="#eee" />
                        <Rectangle ux:Name="bottomRectangle" Height="2" Width="26" Fill="#eee">
                            <Translation Y="9" ux:Name="bottomMenuTranslation" />
                            <Rotation ux:Name="bottomMenuRotation" />
                        </Rectangle>
                    </Panel>
                    <Text ux:Name="HeaderTitle" Margin="5,5,5,5" TextColor="#fff" Alignment="CenterLeft" Value="Events" FontSize="25" Font="LatoRegular"/>
                    <Circle Opacity="1"> 
                        <Circle Alignment="TopRight" Width="20" Height="20" Fill="#FF0000" Margin="5,6,10,5">
                            <Text Value="3" FontSize="10" Alignment="Center" TextColor="#fff" />
                        </Circle> 
                        <Text ux:Name="notif_btn" FontSize="25" TextColor="#ffffff" Alignment="CenterRight" Margin="15,5,15,5" Font="ma" Value="&#xE7F4;"> 
                            <WhilePressed>
                                <Change notif_btn.Color="#999" Duration="0.1" />
                            </WhilePressed>
                        </Text> 
                    </Circle>
                 
                </Grid>
            </StackPanel>  
            <PageControl ux:Name="pages" Active="{active_page}" >
                 
                <EventContainer ux:Name="page2"> 
                    <WhileActive Threshold="1">
                        <Set EdgeNavigator.Active="pages" />
                        <Change btn_page2.Color="#81130F" />
                        <Set HeaderTitle.Value="Events" />
                        
                    </WhileActive>
                </EventContainer> 
            </PageControl>
        
        </DockPanel>
    </EdgeNavigator>```

API Call 

fetch(“https://api.tagcash.com/user/staffof”, {
method: “POST”,
headers: {
“Content-Type”: “application/x-www-form-urlencoded”
},
body: “access_token=”+pref.access_token
}).then(function(response){
return response.json();
}).then(function(response){
if (response.status == “success”) {
for(var i=0;i<response.result.length;i++){
console.log(JSON.stringify(response.result[i]));
communityData.add(response.result[i]);
}
isDataLoaded.value = true;
}
}).catch(function(error){
console.log(error.message);
})


Sample Data Received from API call

{“community_id”:1414,“community_name”:“Beegs”,“community_verified”:true,“role_name”:“Owner”,“role_type”:“owner”}
{“community_id”:1479,“community_name”:“Enderun”,“community_verified”:“merchant”,“role_name”:“Staff”,“role_type”:“staff”}

Hi, thanks for the bug report.

Is it possible for you to provide a trimmed down example that demonstrates the problem in isolation? That would be really helpful, and makes it possible for us to debug. :slight_smile: