-
|
I'm using IMaskMixin to extend a custom component like import { Ref } from 'react'
import { IMaskMixin } from 'react-imask'
import Input from '@/components/base/input'
const MaskedInput = IMaskMixin(({ inputRef, ...props }) => (
<Input
ref={inputRef as Ref<HTMLInputElement>}
{...props}
/>
))
export default MaskedInputwhich worked perfectly until 7.1.3 type for MaskedInput is this crazy thing and everything is good in the world const MaskedInput: ForwardRefExoticComponent<(Omit<ReactElementProps<InputMaskElement> & Omit<ReactMaskProps<InputMaskElement, IMaskMixinProps<InputMaskElement, ReactMaskOpts<...> & ReactMaskProps<...>>>, "ref"> & ... 4 more ... & ReactMaskProps<...>, "ref"> | ... 22 more ... | Omit<...>) & RefAttributes<...>>now with 7.2.0 and 7.3.0 the type for my MaskedInput is const MaskedInput: ForwardRefExoticComponent<Omit<AnyProps, "ref"> & RefAttributes<ComponentType<AnyProps>>>and I lose all autocomplete, etc. Am I doing something wrong? Thank you for this lib :) |
Beta Was this translation helpful? Give feedback.
Answered by
uNmAnNeR
Jan 19, 2024
Replies: 1 comment 1 reply
-
|
Does not this work for you |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
rafma0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Does not this work for you
IMaskInputProps<HTMLInputElement>?