Skip to content

Commit

Permalink
Fix #6964: InputOtp passthrough input correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Aug 1, 2024
1 parent ac3e7ec commit bf62860
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 bf62860

Please sign in to comment.