ui-grid
ui-grid copied to clipboard
Exception thrown editing a string containing a space using flatEntityAccess
We get the issue if the value is set through the underlying model (rather than through the grid directly) to a string containing a space and then click in the cell to edit.
When getCellDisplayValue is called col.cellDisplayGetterCache = $parse(row.entity[col.field] + custom_filter); throws an exception if the string has a space.
This can be fixed by simply wrapping the expression in quotes:
col.cellDisplayGetterCache = $parse("'" + row.entity[col.field] + "'" + custom_filter);
There was a pr raised in May for the same issue (I think) - but wasn't merged
+1
+1 for fixing this
+2 :) (we are having the same issue)