Skip to content

[iOS] SelectedIndex property of the TabView widget does not work #1028

@vchimev

Description

@vchimev

SelectedIndex property of the TabView widget does not work properly on iOS. For example, if you have two TabView items and want to set selectedIndex="1":

  • in the xml file - when TabView shown the first (not the second one) item will be selected,
  • in the js/ts file - when TabView shown, initially the first item will be selected, then the second one as a consequence.

Sample page:

<Page>
  <TabView selectedIndex="1" id="tabView">
    <TabView.items>
      <TabViewItem title="First">
        <TabViewItem.view>
          <GridLayout>
            <Label text="First View" verticalAlignment="center" horizontalAlignment="center"/>
          </GridLayout>
        </TabViewItem.view>
      </TabViewItem>
      <TabViewItem title="Second">
        <TabViewItem.view>
          <GridLayout>
            <Label text="Second View" verticalAlignment="center" horizontalAlignment="center"/>
          </GridLayout>
        </TabViewItem.view>
      </TabViewItem>
    </TabView.items>
  </TabView>
</Page>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions