diff --git a/package.json b/package.json index 3d1dde2..f109f72 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/UiGridAutoFitColumnsService.ts b/src/UiGridAutoFitColumnsService.ts index 939b8cf..388a2c5 100644 --- a/src/UiGridAutoFitColumnsService.ts +++ b/src/UiGridAutoFitColumnsService.ts @@ -1,4 +1,3 @@ -import * as get from 'lodash/object/get'; import Measurer from './Measurer'; import UiGridMetrics from './UiGridMetrics'; @@ -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);