You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(tabs): remove tabbarIcons and fix windows styling to use tabbarLayout
update tabs docs.
BREAKING CHANGE: `tabbarIcons` is officially removed, please use
`tabbarLayout` instead. View the Tabs API docs for more information.
fixes#6126
references #5819
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -361,9 +361,9 @@ Windows platform support has been added to Ionic! The Windows mode is abbreviate
361
361
362
362
### Refactor
363
363
364
-
***alert:** remove tabbarIcons and add tabbarLayout which accepts different values ([8cfebe1](https://github.com/driftyco/ionic/commit/8cfebe1)), closes [#5625](https://github.com/driftyco/ionic/issues/5625)
365
364
***menu:** improve menu get lookup ([004e635](https://github.com/driftyco/ionic/commit/004e635)), closes [#5535](https://github.com/driftyco/ionic/issues/5535)
366
365
***tabs:** remove duplicated styles from imports ([d5ebf3f](https://github.com/driftyco/ionic/commit/d5ebf3f)), closes [#5624](https://github.com/driftyco/ionic/issues/5624)
366
+
***tabs:** remove tabbarIcons and add tabbarLayout which accepts different values ([8cfebe1](https://github.com/driftyco/ionic/commit/8cfebe1)), closes [#5625](https://github.com/driftyco/ionic/issues/5625)
367
367
***searchbar:** add class to searchbar when hideCancel is passed ([a0f0004](https://github.com/driftyco/ionic/commit/a0f0004))
Copy file name to clipboardExpand all lines: ionic/components/tabs/tabs.ts
+7-16Lines changed: 7 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -25,8 +25,8 @@ import {isBlank, isTrueProperty} from '../../util/util';
25
25
* ### Placement
26
26
*
27
27
* The position of the tabs relative to the content varies based on
28
-
* the mode. By default the tabs are placed at the bottom of the screen
29
-
* in `ios` mode, and at the top for `wp` and `md` mode. You can
28
+
* the mode. By default, the tabs are placed at the bottom of the screen
29
+
* for `ios` mode, and at the top for the `md` and `wp` modes. You can
30
30
* configure the position using the `tabbarPlacement` property on the
31
31
* `<ion-tabs>` element, or in your app's [config](../../config/Config/).
32
32
* See the [Input Properties](#input-properties) below for the available
@@ -36,7 +36,7 @@ import {isBlank, isTrueProperty} from '../../util/util';
36
36
*
37
37
* The layout for all of the tabs can be defined using the `tabbarLayout`
38
38
* property. If the individual tab has a title and icon, the icons will
39
-
* show on top of the title in a tab. All tabs can be changed by setting
39
+
* show on top of the title by default. All tabs can be changed by setting
40
40
* the value of `tabbarLayout` on the `<ion-tabs>` element, or in your
41
41
* app's [config](../../config/Config/). For example, this is useful if
42
42
* you want to show tabs with a title only on Android, but show icons
@@ -60,7 +60,7 @@ import {isBlank, isTrueProperty} from '../../util/util';
60
60
* Since the index starts at `0`, this will select the 3rd tab which has
61
61
* root set to `tab3Root`. You can also grab the `Tabs` instance and call
62
62
* the `select()` method. This requires the `<ion-tabs>` element to have
63
-
* an `id`. For example, set the `id` to `myTabs`:
63
+
* an `id`. For example, set the value of `id` to `myTabs`:
64
64
*
65
65
* ```html
66
66
* <ion-tabs id="myTabs">
@@ -70,8 +70,9 @@ import {isBlank, isTrueProperty} from '../../util/util';
70
70
* </ion-tabs>
71
71
* ```
72
72
*
73
-
* Then in your JavaScript you can grab the `Tabs` instance and call `select()`.
74
-
* In the following code `app` is of type [`IonicApp`](../../app/IonicApp/):
73
+
* Then in your JavaScript you can grab the `Tabs` instance and call `select()`,
74
+
* passing the index of the tab as the argument. In the following code `app` is
75
+
* of type [`IonicApp`](../../app/IonicApp/):
75
76
*
76
77
*```js
77
78
* constructor(app: IonicApp) {
@@ -163,11 +164,6 @@ export class Tabs extends Ion {
163
164
*/
164
165
@Input()preloadTabs: any;
165
166
166
-
/**
167
-
* @input {string} Deprecated, use `tabbarLayout` instead. Set the position of the tabbar's icons: `top`, `bottom`, `left`, `right`, `hide`.
168
-
*/
169
-
@Input()tabbarIcons: string;
170
-
171
167
/**
172
168
* @input {string} Set the tabbar layout: `icon-top`, `icon-left`, `icon-right`, `icon-bottom`, `icon-hide`, `title-hide`.
173
169
*/
@@ -241,11 +237,6 @@ export class Tabs extends Ion {
241
237
ngAfterViewInit(){
242
238
this._setConfig('tabbarPlacement','bottom');
243
239
this._setConfig('tabbarLayout','icon-top');
244
-
this._setConfig('tabbarIcons','top');
245
-
246
-
if(this.tabbarIcons){
247
-
console.warn('DEPRECATION WARNING: "tabbarIcons" is no longer supported and will be removed in next major release. Use "tabbarLayout" instead. Available values: "icon-top", "icon-left", "icon-right", "icon-bottom", "icon-hide", "title-hide".');
0 commit comments