Skip to content

Commit

Permalink
Updated api documentation to cover changes in size and refreshItems
Browse files Browse the repository at this point in the history
  • Loading branch information
tomivirkki committed Dec 1, 2015
1 parent eda55a2 commit 8819bac
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
4 changes: 2 additions & 2 deletions vaadin-grid-doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,8 @@
*
* The second parameter for the `items` function is a callback function for
* providing the grid with the requested items. The callback function takes an
* array containing the items and the total number of items in the data source
* as its parameters.
* array containing the items and optinally the total number of items in the
* data source (see grid's `size` property) as its parameters.
*
* #### Example:
*```js
Expand Down
15 changes: 12 additions & 3 deletions vaadin-grid.html
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,16 @@
observer: '_sortOrderChanged'
},

/**
* Explicitly sets the number of records the `items` array/function
* provides for the grid to display.
*
* This may also be set indirectly by passing the value as the second
* parameter for data request callback function.
*
* @property {Number} size
* @type {Number}
*/
size: {
type: Number,
observer: '_sizeChanged'
Expand Down Expand Up @@ -1325,11 +1335,10 @@
* visible items in the grid viewport from the `items` property or the
* `datasource` function, and to scroll back to the top of the grid viewport.
*
* Used to notify the grid when the data items are modified in some way
* (added, removed, updated, etc.).
* Needs to be called whenever the data items are modified in some way
* (added, removed, updated, re-ordered etc.).
*
* @type {Function}
* @param {number} size (optional) - The updated total number of items in the data source. If not defined, the old size will be used.
*/
refreshItems: function() {
this._grid.getDataSource().refreshItems();
Expand Down

0 comments on commit 8819bac

Please sign in to comment.