Skip to content

Commit 200f15e

Browse files
committed
docs: offScreenTabLimit description
1 parent 9672d80 commit 200f15e

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

app/ns-ui-widgets-category/tabs/properties/article.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@
99

1010
- `offscreenTabLimit: number;` - Gets or sets the number of offscreen preloaded tabs of the Tabs.
1111

12+
Example:
13+
14+
- Let's assume that the TabContentItem[1] is selected (`selectedIndex = 1`) and `offscreenTabLimit` is set to 1.
15+
16+
**Result:** The content for TabContentItem[0] and TabContentItem[2] will be pre-loaded.
17+
18+
- Select TabContentItem[2] (`selectedIndex = 2`).
19+
20+
**Result:** TabContentItem[0] will be unloaded and TabContentItem[3] will be pre-loaded.
21+
1222
- `tabsPosition: "top" | "bottom";` - Gets or sets the position state of the Tabs.
1323

1424
- `android: any` /* android.view.View */; - Gets the native [android widget](http://developer.android.com/reference/android/support/v4/view/ViewPager.html) that represents the user interface for this component. Valid only when running on Android OS.

app/ns-ui-widgets-category/tabs/properties/properties-page.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,12 @@ exports.onTabsLoaded = (args) => {
2828
*/
2929
tabs.selectedIndex = 1;
3030
tabs.swipeEnabled = true;
31+
32+
/*
33+
offscreenTabLimit: Sets the number of TabContentItem to be preloaded.
34+
*/
3135
tabs.offscreenTabLimit = 1;
32-
tabs.tabsPosition = "top";
36+
tabs.tabsPosition = "top"; // Suppported values: 'top' or 'bottom'
3337

3438
/*
3539
Using the nativeView property (correspnding to tabs.ios or tabs.android depending on the used platform)

0 commit comments

Comments
 (0)