Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions aggrid/groupingtable/groupingtable.js
Original file line number Diff line number Diff line change
Expand Up @@ -4483,6 +4483,42 @@ angular.module('aggridGroupingtable', ['webSocketModule', 'servoy']).directive('
}
}

/**
* Returns the sort state of the datagrid
* @return {object}
* @public
*/
$scope.api.getSortModel = function() {
return gridOptions.api.getSortModel();
}

/**
* Sets the sort state of the datagrid
* @param {object} model
* @public
*/
$scope.api.setSortModel = function(model) {
gridOptions.api.setSortModel(model);
}

/**
* Gets the current state of all the advanced filters of datagrid. Used for saving filter state.
* @return {object}
* @public
*/
$scope.api.getFilterModel = function() {
return gridOptions.api.getFilterModel();
}

/**
* Sets the state of all the advanced filters in datagrid. Provide it with what you get from getFilterModel() to restore filter state.
* @param {object} model
* @public
*/
$scope.api.setFilterModel = function(model) {
gridOptions.api.setFilterModel(model);
}

// FIXME how to force re-fit when table is shown for the first time

// bind resize event
Expand Down
17 changes: 16 additions & 1 deletion aggrid/groupingtable/groupingtable.spec
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,22 @@
"delayUntilFormLoads": true,
"discardPreviouslyQueuedSimilarCalls": true
},
"scrollToSelection": {}
"scrollToSelection": {
},
"getSortModel": {
"parameters": [],
"returns": "object"
},
"setSortModel": {
"parameters": [{"name": "model","type": "object"}]
},
"getFilterModel": {
"parameters": [],
"returns": "object"
},
"setFilterModel": {
"parameters": [{"name": "model","type": "object"}]
}
},
"internalApi" : {
"getGroupedFoundsetUUID" : {
Expand Down