react-code-input icon indicating copy to clipboard operation
react-code-input copied to clipboard

filterCharsIsWhitelist not work

Open 141616 opened this issue 5 years ago • 4 comments

Hi, when i use filterCharsIsWhitelist with filterChars, but it dose not work.

/** Filter Chars */
value = value.split('').filter(currChar => {
  if (filterCharsIsWhitelist) {
    return filterChars.includes(currChar);
  }
  return !filterChars.includes(currChar);
}).join('');

it seems that the Filter Chars code dose not build in to dist.

version: 3.9.0

141616 avatar Mar 13 '20 04:03 141616

Also experiencing this issue

mitchconquer avatar Jul 27 '20 19:07 mitchconquer

Same here.

mathdevie avatar Nov 04 '20 10:11 mathdevie

seems this issue is still present. tried filterCharsIsWhitelist = true, it didn't work

checked code in dist, it doesn't have filterCharsIsWhitelist value

 /** Filter Chars */
    value = value.split('').filter(currChar => !filterChars.includes(currChar)).join('');

version: 3.10.1

yuji-gr avatar May 05 '21 18:05 yuji-gr

Iit should be working if we refer to the src https://github.com/40818419/react-code-input/blob/2599c5d26c496b7a4e3cc91604c2da6f5808c602/src/ReactCodeInput.js#L103-L109

But it looks like the dist is not updated according to this version on src

edwin-tandiono avatar Feb 17 '22 07:02 edwin-tandiono