@nativescript-community/ui-material-core-tabs 7.0.42 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nativescript-community/ui-material-core-tabs",
3
- "version": "7.0.42",
3
+ "version": "7.1.0",
4
4
  "description": "Material Core Tabs component",
5
5
  "main": "./index",
6
6
  "sideEffects": false,
@@ -39,7 +39,7 @@
39
39
  "repository": "https://github.com/nativescript-community/ui-material-components",
40
40
  "readmeFilename": "README.md",
41
41
  "dependencies": {
42
- "@nativescript-community/ui-material-core": "^7.0.42"
42
+ "@nativescript-community/ui-material-core": "^7.1.0"
43
43
  },
44
- "gitHead": "4967955be76fe33eec65879a8cad32ecb5e74a0f"
44
+ "gitHead": "f88bb036c6d834fb74920ce394a78b2b9cf090a2"
45
45
  }
@@ -178,12 +178,16 @@ public class TabsBar extends HorizontalScrollView {
178
178
  public void setItems(TabItemSpec[] items) {
179
179
  mTabStrip.removeAllViews();
180
180
  mTabItems = items;
181
- if (mViewPager != null) {
181
+ if (mViewPager != null && mViewPager.getAdapter() != null) {
182
182
  populateTabStrip();
183
183
  }
184
184
 
185
185
  }
186
186
 
187
+ public void scrollToTab(int tabIndex) {
188
+ scrollToTab(tabIndex, 0);
189
+ }
190
+
187
191
  /**
188
192
  * Updates the UI of an item at specified index
189
193
  */