Skip to content

Commit

Permalink
feat(core): use internal uiGrid cell value getter to allow fn executi…
Browse files Browse the repository at this point in the history
…on in colDef.field

closes #5
  • Loading branch information
ivan-jelev authored and Den-dp committed Oct 29, 2019
1 parent 26ad8e4 commit 13b57c7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"cz-conventional-changelog": "~1.1.6",
"ghooks": "~1.2.1",
"jquery": "~2.2.4",
"lodash": "~3.10.1",
"ng-annotate-webpack-plugin": "~0.1.2",
"rimraf": "~2.5.2",
"semantic-release": "~4.3.5",
Expand Down
3 changes: 1 addition & 2 deletions src/UiGridAutoFitColumnsService.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as get from 'lodash/object/get';
import Measurer from './Measurer';
import UiGridMetrics from './UiGridMetrics';

Expand Down Expand Up @@ -105,7 +104,7 @@ export class UiGridAutoFitColumnsService {
optimalWidths[columnKey] = Measurer.measureRoundedTextWidth(column.displayName, this.gridMetrics.getHeaderFont()) + this.gridMetrics.getHeaderButtonsWidth();

rows.forEach((row) => {
let cellText = get(row.entity, columnKey);
let cellText = row.grid.getCellValue(row, column);

if (!!column.colDef.cellFilter) {
cellText = this.getFilteredValue(cellText, column.colDef.cellFilter);
Expand Down

0 comments on commit 13b57c7

Please sign in to comment.