Skip to content

Commit

Permalink
Spread operator at string was converted to concat(wrongly) after buil…
Browse files Browse the repository at this point in the history
…ding (#53)
  • Loading branch information
gustavorosolem authored Sep 16, 2021
1 parent b8e59bd commit f6715bc
Show file tree
Hide file tree
Showing 2 changed files with 14,121 additions and 14,858 deletions.
12 changes: 6 additions & 6 deletions styleguide/src/Forms/InputMask/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ export const formatValuePatterns = {
default: {},
onlyNumber: {
mask: (rawValue: any) => {
const onlyNumbers = rawValue.replace(/\D/g, '')
return [...onlyNumbers].map(() => /\d/)
const onlyNumbers = rawValue.replace(/\D/g, '').split('')
return onlyNumbers.map(() => /\d/)
},
inputMode: 'decimal',
},
onlyLetter: {
mask: (rawValue: any) => {
const onlyAlphanumeric = rawValue.replace(/[^A-zÀ-ú]/g, '')
return [...onlyAlphanumeric].map(() => /[A-zÀ-ú]/)
const onlyAlphanumeric = rawValue.replace(/[^A-zÀ-ú]/g, '').split('')
return onlyAlphanumeric.map(() => /[A-zÀ-ú]/)
},
},
onlyAlphanumeric: {
mask: (rawValue: any) => {
const onlyAlphanumeric = rawValue.replace(/\W/g, '')
return [...onlyAlphanumeric].map(() => /\w/)
const onlyAlphanumeric = rawValue.replace(/\W/g, '').split('')
return onlyAlphanumeric.map(() => /\w/)
},
},
date: {
Expand Down
Loading

0 comments on commit f6715bc

Please sign in to comment.