Skip to content

Instantly share code, notes, and snippets.

@josebalius
Created June 1, 2014 21:45
Show Gist options
  • Save josebalius/f6abe59153d97d646f40 to your computer and use it in GitHub Desktop.
Save josebalius/f6abe59153d97d646f40 to your computer and use it in GitHub Desktop.
ngReactGrid - Setup options
{
// Properties you can set
columnDefs: [],
data: [],
height: 500,
localMode: true,
/**
* Use this function when setting localMode = false,
* it will be called for every change in page size, sort, search, or pagination.
* @return void
*/
getData: function() {
var grid = this;
// grid.currentPage
// grid.search
// grid.sortInfo.field, grid.sortInfo.dir
// grid.pageSize
// After making the server call, update the grid by simply setting the data and totalCount
// $scope.grid.data = [], $scope.grid.totalCount = 0
},
totalCount: 0,
pageSize: 25,
pageSizes: [25, 50, 100],
horizontalScroll: false,
// Properties you can get, usually calculated after instantiation
totalPages: 0, // calculated with pageSize and totalCount
currentPage: 1,
sortInfo: {
field: "", // field property in columnDefs
dir: "" // asc or desc
},
search: ""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment