Skip to content

Commit

Permalink
docs(ui-grid.info): Added missing documentation.
Browse files Browse the repository at this point in the history
Documented headerRowHeight, sort priority, setRowsDirty and savePagination.

closes #4098, closes #5518, closes #5661, closes #6671
  • Loading branch information
Portugal, Marcelo authored and mportuga committed Jun 22, 2018
1 parent 85838e5 commit 71c3db8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
1 change: 1 addition & 0 deletions misc/tutorial/208_save_state.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ default:
- saveVisible
- saveSort
- saveFilter
- savePagination
- savePinning
- saveGrouping
- saveGroupingExpandedStates
Expand Down
5 changes: 3 additions & 2 deletions src/features/row-edit/js/gridRowEdit.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,11 @@
* @methodOf ui.grid.rowEdit.api:PublicApi
* @name setRowsDirty
* @description Sets each of the rows passed in dataRows
* to be dirty. note that if you have only just inserted the
* to be dirty. Note that if you have only just inserted the
* rows into your data you will need to wait for a $digest cycle
* before the gridRows are present - so often you would wrap this
* call in a $interval or $timeout
* call in a $interval or $timeout. Also, you must pass row.entity
* into this function rather than row objects themselves.
* <pre>
* $interval( function() {
* gridApi.rowEdit.setRowsDirty(myDataRows);
Expand Down
2 changes: 1 addition & 1 deletion src/js/core/factories/GridColumn.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ angular.module('ui.grid')
* - direction: values are {@link ui.grid.service:uiGridConstants#properties_ASC uiGridConstants.ASC}
* or {@link ui.grid.service:uiGridConstants#properties_DESC uiGridConstants.DESC}
* - ignoreSort: if set to true this sort is ignored (used by tree to manipulate the sort functionality)
* - priority: says what order to sort the columns in (lower priority gets sorted first).
* - priority: says what order to sort the columns in (lower priority gets sorted first). Starts from 0.
* @example
* <pre>
* $scope.gridOptions.columnDefs = [{
Expand Down
12 changes: 9 additions & 3 deletions src/js/core/factories/GridOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,19 @@ angular.module('ui.grid')
*/
baseOptions.showHeader = typeof(baseOptions.showHeader) !== "undefined" ? baseOptions.showHeader : true;

/* (NOTE): Don't show this in the docs. We only use it internally
/**
* @ngdoc property
* @name headerRowHeight
* @propertyOf ui.grid.class:GridOptions
* @description The height of the header in pixels, defaults to 30
* @description The height of the header in pixels, defaults to 30.
* Although, we recommend that you alter header height with CSS rather than using this option:
*
*/
* <pre>
* .grid .ui-grid-header-cell {
* height: 60px;
* }
* </pre>
**/
if (!baseOptions.showHeader) {
baseOptions.headerRowHeight = 0;
}
Expand Down

0 comments on commit 71c3db8

Please sign in to comment.