Open korgon opened 2 years ago
I'd recommend using NumberFormat
.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Modifying format outside of the SMC goes against future self service goals. However, for custom cases we may want to add a prop to the component that would accept a function to replace the formatValue
from the SMC.
Closely related to https://github.com/searchspring/snap/issues/715
Currently the slider formatting is handled via
sprintf
set within the SMC - however this has been found to have limitations. Currently it is not possible to format numbers with comma separators (as one example).There is either lack of support within
sprintf
itself, or within the JS library we are using.Proposed solutions are to update our
sprintf
if possible to support this - or find an alternative way to set formatting options for the facet slider component.