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
Once initialized, the grid was displaying buggy behavior when swapping
column definitions in or out. This change fixes that behavior, and allows
for Grid.buildColumns() to reorder columns according to the order of
columnDefs by supplying an option parameter with the property
`orderByColumnDefs` set to true.
This also required changing the call to buildColumns() within the grid's
dataWatchFunction so that it uses this option.
Fixes#1948
Copy file name to clipboardExpand all lines: src/js/core/factories/Grid.js
+41-2
Original file line number
Diff line number
Diff line change
@@ -561,9 +561,19 @@ angular.module('ui.grid')
561
561
* @methodOf ui.grid.class:Grid
562
562
* @description creates GridColumn objects from the columnDefinition. Calls each registered
563
563
* columnBuilder to further process the column
564
+
* @param {object} options An object contains options to use when building columns
565
+
*
566
+
* * **orderByColumnDefs**: defaults to **false**. When true, `buildColumns` will reorder existing columns according to the order within the column definitions.
567
+
*
564
568
* @returns {Promise} a promise to load any needed column resources
0 commit comments