ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Exception thrown editing a string containing a space using flatEntityAccess

Open MattOakley opened this issue 10 years ago • 3 comments

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

MattOakley avatar Oct 27 '16 13:10 MattOakley

+1

JZehet avatar Nov 21 '16 09:11 JZehet

+1 for fixing this

MichalJakubeczy avatar Jan 05 '17 09:01 MichalJakubeczy

+2 :) (we are having the same issue)

MatejQ avatar Jan 09 '17 12:01 MatejQ