We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c90dd30 commit 84cbfacCopy full SHA for 84cbfac
1 file changed
src/shared/ui/TextField/TextField.tsx
@@ -92,6 +92,9 @@ export const TextField = ({
92
93
if (isPrice) {
94
next = next.replace(/\D/g, '');
95
+ if (maxLen !== undefined) {
96
+ next = next.slice(0, maxLen);
97
+ }
98
(e.target as HTMLInputElement).value = next;
99
}
100
@@ -131,7 +134,7 @@ export const TextField = ({
131
134
type="text"
132
135
value={displayValue}
133
136
disabled={disabled}
- maxLength={maxLen}
137
+ maxLength={isPrice ? undefined : maxLen}
138
className={clsx(styles.fieldBase(), styles.input())}
139
onChange={handleChange}
140
inputMode={isPrice ? 'numeric' : undefined}
0 commit comments