Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Inline Snippet field renderer for Skuid --- eliminates decimal places on any Double, Percent, or Currency display type fields that it is applied to
var field = arguments[0],
value = arguments[1],
metadata = field.metadata,
dt = metadata.displaytype;
// For currency, double, and percent fields,
// manually override the field's metadata
// related to how many decimal points to display
if (dt == 'CURRENCY' || dt == 'DOUBLE' || dt == 'PERCENT') {
metadata.scale = 0;
// Run the field's default renderer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.