breeffy/react-native-monorepo

Allow items to be strings convertible to numbers

likern opened this issue · 2 comments

In <NumberPicker ... /> component items property is number[].
If we use specially formatted numbers by Intl.NumberFormat items might become strings.

const HourAndMinutesNumberFormat = new Intl.NumberFormat('en-US', {
  style: 'decimal',
  // @ts-ignore
  signDisplay: 'never',
  useGrouping: false,
  minimumIntegerDigits: 2
});

We can allow items to be strings, but which should be convertible to numbers.

Branch issue-142 created. Open it in the web editor.