ionic-team / ionic-team/ionic-framework

bug: SelectedTab on ion-tab-bar does not activate selected tab as default

Đang mở
#20,060 3 bình luận 1 reaction 0 người được giao Xem trên GitHub
package: core type: bug
Ngôn ngữ chính
TypeScript
Star
52.7k
Fork
13.3k
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
51

Mô tả

# Bug Report

**Ionic version:**
[x] **4.x**

**Current behavior:**
Preferred tab as per property `selectedTab` when opening tabs is not selected

**Expected behavior:**
Preferred tab as per property `selectedTab` when opening tabs is selected (as per documentation).

**Steps to reproduce:**
Take sample code as per `https://github.com/ionic-team/ionic-docs/tree/master/src/demos/api/tabs/index.html` and put in a separate file with extension html.

Replace code `` with ``

Open file in Chrome. Tab movies is not selected.

**Related code:**
See above

**Other information:**
Plain javascript file, no framework used. Same issue seems to appear when trying to set `selected="true"` on ion-tab-button.

Related issue reported https://stackoverflow.com/questions/53860450/ionic-4-preselect-a-tab-in-a-modal. Using `selected-tab` as property does not work. Using JS is not desired (through controller).

**Ionic info:**
```
[WARN] You are not in an Ionic project directory. Project context may be missing.

Ionic:

Ionic CLI : 5.4.5

Utility:

cordova-res : not installed
native-run : not installed

System:

NodeJS : v12.13.0
npm : 6.12.0
OS : Windows 10
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.