From 4e6ad990e91c9f27cfb97bc34b953e18d05cdba1 Mon Sep 17 00:00:00 2001 From: Robert Moore Date: Tue, 24 Sep 2019 10:56:13 -0400 Subject: [PATCH] [Tabs] Update TabBarView documentation. (#8489) Adding a section describing the change in behavior for `selectedItem` when `items` is set. Follow-up to #7672 --- components/Tabs/README.md | 10 +++++++++- components/Tabs/docs/tabbarview.md | 7 +++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/components/Tabs/README.md b/components/Tabs/README.md index 61bb119bd3e..75794774c74 100644 --- a/components/Tabs/README.md +++ b/components/Tabs/README.md @@ -8,7 +8,7 @@ path: /catalog/tabs/ api_doc_root: true --> - + # Tabs @@ -402,6 +402,13 @@ Subclassing is not supported by `MDCTabBarView`. Any requirements that you have for Material Tabs that are not met by the public APIs should be filed as a feature request or bug against `MDCTabBarView`. +#### Selected Item Behavior + +`MDCTabBarView` does not automatically mark any item as *selected* when the +`items` array is set, unless the previously-selected item is in the new +`items` array. This is a change from `MDCTabBar`, but ensures that the view +and its APIs present equivalent information. + #### Colors, Fonts, and Theming To set the image tint colors, use `- setImageTintColor:forState:`. The @@ -455,6 +462,7 @@ subclass conforming to the `MDCTabBarItemCustomViewing` protocol is provided as `MDCTabBarItem`. + ##### Swift ```swift let customView = MyCustomTabView() diff --git a/components/Tabs/docs/tabbarview.md b/components/Tabs/docs/tabbarview.md index 045dc47b8ea..6fa3867870e 100644 --- a/components/Tabs/docs/tabbarview.md +++ b/components/Tabs/docs/tabbarview.md @@ -58,6 +58,13 @@ Subclassing is not supported by `MDCTabBarView`. Any requirements that you have for Material Tabs that are not met by the public APIs should be filed as a feature request or bug against `MDCTabBarView`. +#### Selected Item Behavior + +`MDCTabBarView` does not automatically mark any item as *selected* when the +`items` array is set, unless the previously-selected item is in the new +`items` array. This is a change from `MDCTabBar`, but ensures that the view +and its APIs present equivalent information. + #### Colors, Fonts, and Theming To set the image tint colors, use `- setImageTintColor:forState:`. The