From 8b10431a9be402f08122383c30ad44c0a58fc063 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 31 Aug 2016 20:50:53 +0200 Subject: [PATCH] docs(tabs): remove invalid property in documentation (#1140) * docs(tabs): remove invalid property in documentation * The `focusIndex` has been removed, and was actually the same as the `selectedIndex` from the description as well. * Also added a quick example for the `selectedIndex` * Update small note Fixes #1134 --- src/lib/tabs/README.md | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/src/lib/tabs/README.md b/src/lib/tabs/README.md index ab39a34594a..8e6a763baf1 100644 --- a/src/lib/tabs/README.md +++ b/src/lib/tabs/README.md @@ -1,6 +1,20 @@ # MdTabGroup Tab groups allow the user to organize their content by labels such that only one tab is visible at any given time. +## `` +### Properties + +| Name | Type | Description | +| --- | --- | --- | +| `selectedIndex` | `number` | The index of the currently active tab. | + +### Events + +| Name | Type | Description | +| --- | --- | --- | +| `focusChange` | `Event` | Fired when focus changes from one label to another | +| `selectChange` | `Event` | Fired when the selected tab changes | + ### Examples A basic tab group would have the following markup. ```html @@ -22,17 +36,12 @@ A basic tab group would have the following markup. ``` -## `` -### Properties +It is also possible to specifiy the active tab by using the `selectedIndex` property. -| Name | Type | Description | -| --- | --- | --- | -| `selectedIndex` | `number` | The index of the currently active tab. | -| `focusIndex` | `number` | The index of the currently active tab. | +```html + + ... + +``` -### Events - -| Name | Type | Description | -| --- | --- | --- | -| `focusChange` | `Event` | Fired when focus changes from one label to another | -| `selectChange` | `Event` | Fired when the selected tab changes | +**Note**: The index always starts counting from `zero`.