Skip to content

Commit 8b10431

Browse files
devversionkara
authored andcommitted
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
1 parent 2327270 commit 8b10431

File tree

1 file changed

+21
-12
lines changed

1 file changed

+21
-12
lines changed

src/lib/tabs/README.md

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
# MdTabGroup
22
Tab groups allow the user to organize their content by labels such that only one tab is visible at any given time.
33

4+
## `<md-tab-group>`
5+
### Properties
6+
7+
| Name | Type | Description |
8+
| --- | --- | --- |
9+
| `selectedIndex` | `number` | The index of the currently active tab. |
10+
11+
### Events
12+
13+
| Name | Type | Description |
14+
| --- | --- | --- |
15+
| `focusChange` | `Event` | Fired when focus changes from one label to another |
16+
| `selectChange` | `Event` | Fired when the selected tab changes |
17+
418
### Examples
519
A basic tab group would have the following markup.
620
```html
@@ -22,17 +36,12 @@ A basic tab group would have the following markup.
2236
</md-tab-group>
2337
```
2438

25-
## `<md-tab-group>`
26-
### Properties
39+
It is also possible to specifiy the active tab by using the `selectedIndex` property.
2740

28-
| Name | Type | Description |
29-
| --- | --- | --- |
30-
| `selectedIndex` | `number` | The index of the currently active tab. |
31-
| `focusIndex` | `number` | The index of the currently active tab. |
32-
33-
### Events
41+
```html
42+
<md-tab-group [selectedIndex]="1">
43+
...
44+
</md-tab-group>
45+
```
3446

35-
| Name | Type | Description |
36-
| --- | --- | --- |
37-
| `focusChange` | `Event` | Fired when focus changes from one label to another |
38-
| `selectChange` | `Event` | Fired when the selected tab changes |
47+
**Note**: The index always starts counting from `zero`.

0 commit comments

Comments
 (0)