taiga-family/maskito

๐Ÿž - `Number` should drop items from `decimalPseudoSeparators` if any is equal to `thousandSeparator`

namereva opened this issue ยท 4 comments

Which package(s) are the source of the bug?

@maskito/kit

Playground Link

https://tinkoff.github.io/maskito/kit/number/API?sandboxExpanded=true&precision=2&decimalPseudoSeparators$=0&decimalSeparator=.&decimalZeroPadding=false&thousandSeparator=%C2%A0,

Description

The bug appear when we use decimalPseudoSeparators with thousandSeparator comma.

const OPTIONS = {
  precision: 2,
  decimalPseudoSeparators: ['.', ',', 'ะฑ', 'ัŽ'],
  thousandSeparator: ',',
  decimalSeparator: '.',
};

Maskito version

1.4.0

Which browsers have you used?

  • Chrome
  • Firefox
  • Safari
  • Edge

Which operating systems have you used?

  • macOS
  • Windows
  • Linux
  • iOS
  • Android

@namereva Hello!

I think that decimalPseudoSeparators must not include thousandSeparator ๐Ÿค”

Sorry, miss click(
I thought it was like alias for buttons
@nsbarsukov

Anyway this is looks like bug. Maybe docs should be improved. For example added alert about this case.

We can internally drop items from decimalPseudoSeparators if anything is equal of thousandSeparator ๐Ÿ‘Œ