Skip to content

Commit 358ea3b

Browse files
authored
Fix primefaces#6964: InputOtp passthrough input correctly (primefaces#6965)
1 parent e06d211 commit 358ea3b

File tree

1 file changed

+16
-18
lines changed

1 file changed

+16
-18
lines changed

components/lib/inputotp/InputOtp.js

+16-18
Original file line numberDiff line numberDiff line change
@@ -199,24 +199,22 @@ export const InputOtp = React.memo(
199199
onBlur,
200200
onPaste
201201
};
202-
const inputElementProps = mergeProps(
203-
{
204-
id: inputElementIndex,
205-
key: inputElementIndex,
206-
value: tokens[inputElementIndex] || '',
207-
inputMode: props?.integerOnly ? 'numeric' : 'text',
208-
type: props?.mask ? 'password' : 'text',
209-
variant: props?.variant,
210-
readOnly: props?.readOnly,
211-
disabled: props?.disabled,
212-
invalid: props?.invalid,
213-
tabIndex: props?.tabIndex,
214-
unstyled: props?.unstyled,
215-
'aria-label': ariaLabel('otpLabel', { 0: inputElementIndex + 1 }),
216-
className: cx('input')
217-
},
218-
ptm('input')
219-
);
202+
const inputElementProps = mergeProps({
203+
id: inputElementIndex,
204+
key: inputElementIndex,
205+
value: tokens[inputElementIndex] || '',
206+
inputMode: props?.integerOnly ? 'numeric' : 'text',
207+
type: props?.mask ? 'password' : 'text',
208+
variant: props?.variant,
209+
readOnly: props?.readOnly,
210+
disabled: props?.disabled,
211+
invalid: props?.invalid,
212+
tabIndex: props?.tabIndex,
213+
unstyled: props?.unstyled,
214+
'aria-label': ariaLabel('otpLabel', { 0: inputElementIndex + 1 }),
215+
className: cx('input'),
216+
pt: ptm('input')
217+
});
220218
const inputElement = props?.inputTemplate ? (
221219
ObjectUtils.getJSXElement(props?.inputTemplate, {
222220
events: inputElementEvents,

0 commit comments

Comments
 (0)