Skip to content

Commit

Permalink
Fix primefaces#6964: InputOtp passthrough input correctly (primefaces…
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Aug 1, 2024
1 parent e06d211 commit 358ea3b
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions components/lib/inputotp/InputOtp.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,24 +199,22 @@ export const InputOtp = React.memo(
onBlur,
onPaste
};
const inputElementProps = mergeProps(
{
id: inputElementIndex,
key: inputElementIndex,
value: tokens[inputElementIndex] || '',
inputMode: props?.integerOnly ? 'numeric' : 'text',
type: props?.mask ? 'password' : 'text',
variant: props?.variant,
readOnly: props?.readOnly,
disabled: props?.disabled,
invalid: props?.invalid,
tabIndex: props?.tabIndex,
unstyled: props?.unstyled,
'aria-label': ariaLabel('otpLabel', { 0: inputElementIndex + 1 }),
className: cx('input')
},
ptm('input')
);
const inputElementProps = mergeProps({
id: inputElementIndex,
key: inputElementIndex,
value: tokens[inputElementIndex] || '',
inputMode: props?.integerOnly ? 'numeric' : 'text',
type: props?.mask ? 'password' : 'text',
variant: props?.variant,
readOnly: props?.readOnly,
disabled: props?.disabled,
invalid: props?.invalid,
tabIndex: props?.tabIndex,
unstyled: props?.unstyled,
'aria-label': ariaLabel('otpLabel', { 0: inputElementIndex + 1 }),
className: cx('input'),
pt: ptm('input')
});
const inputElement = props?.inputTemplate ? (
ObjectUtils.getJSXElement(props?.inputTemplate, {
events: inputElementEvents,
Expand Down

0 comments on commit 358ea3b

Please sign in to comment.