solid-ui
solid-ui copied to clipboard
'formatter' Number Field Property
User Story
As a Form Designer, I can optionally set the formatter to apply to a number field, so I can correctly display the number.
Acceptance Criteria
- In a Form Model, a 'formatter' property can be optionally defined for a NumberField. For example:
ui:formatter "####.#";
- When the form is rendered, the formatter is used to display the number.
Is there a standard for the format string? There is always printf which of course was blessed by being built into the python language as well. Use that -- ie "4.2d" rather than ####.## ? Got a good js library?
Maybe https://www.npmjs.com/package/sprintf-js is Bsd-3