Thanks to your sample snippet, I figured out how to do some simple highlighting of a value with a snippet when it is read-only. The below code highlights an integer value when it is greater than zero:
var field = arguments[0], value = arguments[1], display; if (field.mode == 'read') { if (value > 0) { display = '<b>    ' + value + '    </b>'; } else { display = value; } field.element.append(display); } else if (field.mode == 'edit') { skuid.ui.fieldRenderers.INTEGER.edit(field,value); }
I show this field in a table, and use the snippet as a custom renderer, and it seems to work as expected (yea!): Now I could probably easily add a reference to an image instead of coloring the text to make it even prettier. However, these approaches only work when the field isn’t editable (and I’m not sure if I’m up to building a new editor component). What I’d love is to be able to highlight the entire background of the cell based on the field’s value, and especially to be able to do this even when the field is in edit mode. That would improve the look and ensure that it is consistently displayed in either mode. Is this possible?