FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[iOS] SelectedIndex property of the TabView widget does not work · Issue #1028 · NativeScript/NativeScript · GitHub

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

Description

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>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL