XamarinCommunityToolkit icon indicating copy to clipboard operation
XamarinCommunityToolkit copied to clipboard

[Bug] Tabview does not show content when used with StateLayout

Open WiproSarthak opened this issue 3 years ago • 4 comments

Tabview do not load each tabItem content when used with statelayout.When the page loads for the first time tabview is hidden due to loading state of statelayout once statelayout currentstate becomes succes, only TabView Header shows its content didn't show up

Steps to Reproduce

  1. Put TabView insisde StateLayout success state
  2. Open page with any other state then success.
  3. Wait for few second and set Statelayout current state to Success

Expected Behavior

TabView should appear with contents of each TabItem

Actual Behavior

Only Tab header is visible content of each Item didn't show up

Basic Information

  • Version with issue: 1.1.0
  • Last known good version:
  • IDE: Visual Studio

Reproduction Link : TabViewStateLayoutIssueRepo.zip

Steps:

  1. MainPage opens with Empty state for StateLayout
  2. Click on LoadTabView
  3. Current state becomes succes only tabview headers show each tab items content remains still hidden

WiproSarthak avatar Apr 08 '21 04:04 WiproSarthak

I have also hit this issue.
A shame as the StateLayout is awesome as is the TabView ... yet cannot work together. :-(

@WiproSarthak did you find a workaround? I assume you went back to having show/hide variables in your VM and binding to IsVisible props on the layout?

Chris-Marassovich avatar Aug 25 '21 07:08 Chris-Marassovich

@Chris-Marassovich unfortunately I had to move StateLayout from outside to inside the each TabView so TabView will be Visibile when page loads.If we do IsVisible=false to entire TabView by default when page loads so again same issue arises as StateLayout is also doing the same thing.

SarthakGz avatar Nov 19 '21 05:11 SarthakGz

I suspect this issue relates to #1294

It appears that the underlying CarouselView in the TabView does not correctly update its child views

bijington avatar Nov 19 '21 07:11 bijington

This might have fixed by this https://github.com/xamarin/Xamarin.Forms/pull/13370 need to verify though

SarthakGz avatar Feb 07 '22 07:02 SarthakGz