How to use the react-widgets/lib/configure.setNumberLocalizer function in react-widgets

To help you get started, we’ve selected a few react-widgets examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jquense / react-widgets / packages / localizer-simple-number / localizer.js View on Github external
format(value, format) {
      return formatNumber(value, format)
    },

    decimalChar(format) {
      return (format && deconstruct(format).decimalsSeparator) || decimal || '.'
    },

    precision(format) {
      let data = deconstruct(format)
      return data.maxRight !== -1 ? data.maxRight : null
    }
  }

  configure.setNumberLocalizer(localizer)
  return localizer
}