You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,13 +60,17 @@ There is no additional configuration needed!
60
60
| itemTemplate |`string`| Gets or sets the item template of the CollectionView. |
61
61
| rowHeight |`PercentLength`| Gets or sets the height for every row in the CollectionView. |
62
62
| colWidth |`PercentLength`| Gets or sets the width for every column in the CollectionView. |
63
+
| spanSize |`function`| Triggered when an item is loaded. Returns the number of columns that the element should occupy taking into account `colWidth` when the device is vertical and `rowHeight` when horizontal. Parameters: (item, index: number). |
64
+
| scrollOffset |`number`| Gets the current scroll. |
| refresh() |`void`| Forces the CollectionView to reload all its items. |
71
+
| refreshVisibleItem() |`void`| Forces CollectionView to reload visible items. |
69
72
| scrollToIndex(index: number, animated: boolean = true) |`void`| Scrolls the CollectionView to the item with the given index. This can be either animated or not. Defaults to animated. |
73
+
| isItemAtIndexVisible(index: number) |`boolean`| Returns a boolean indicating whether the item is visible. |
70
74
71
75
## Usage
72
76
You need to add `xmlns:gv="@nativescript-community/ui-collectionview"` to your page tag, and then simply use `<gv:CollectionView/>` in order to add the widget to your page. Use `<gv:Gridview.itemTemplate/>` to specify the template for each cell:
0 commit comments