I'm making page with 2 tab and each of them have search bar on top of them, the searchbar value on first tab remains when im navigating to other tabs and back to the first tab. How do i remove the state or reference when im navigating to other tab? so when navigating back to the first tab its a new page(no value on the search bar and constructor is triggered) instead of old one(constructor is not triggered).
I'm using xamarin shell.
<Tab Title="Coffee">
<Tab.Icon>
<FontImageSource FontFamily="FAS"
Color="{AppThemeBinding
Dark=White,
Light={StaticResource SystemGray5Dark}}"
Glyph="{StaticResource IconCoffee}"/>
</Tab.Icon>
<ShellContent Title="Light" ContentTemplate="{DataTemplate local:CoffeeEquipmentPage}" Route="CoffeeEquipmentPage" />
<ShellContent Title="Medium" ContentTemplate="{DataTemplate local:CoffeeEquipmentPage}" Route="CoffeeEquipmentPage2" />
<ShellContent Title="Dark" ContentTemplate="{DataTemplate local:CoffeeEquipmentPage}" Route="CoffeeEquipmentPage3" />
</Tab>
<Tab Title="Espresso">
<Tab.Icon>
<FontImageSource FontFamily="FAS"
Color="{AppThemeBinding
Dark=White,
Light={StaticResource SystemGray5Dark}}"
Glyph="{x:Static fontAwesome:FontAwesomeIcons.MugHot}"/>
</Tab.Icon>
<ShellContent Title="tab 2" ContentTemplate="{DataTemplate local:CoffeeEquipmentPage}" Route="CoffeeEquipmentPage3" />
</Tab>
I've attached gif to show the behaviour. link