Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hello facing types errors #198

Open
GolfredoPerezFernandez opened this issue Mar 31, 2024 · 1 comment
Open

hello facing types errors #198

GolfredoPerezFernandez opened this issue Mar 31, 2024 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@GolfredoPerezFernandez
Copy link

GolfredoPerezFernandez commented Mar 31, 2024

hello! i just remove all warnings by doing this but did not work

//
{(field, props) => (


<input
{...props}
ref={loginPasswordRef}
value={field.value}
type="password"
name="password"
id="password"
onChange$={onChangeHandler}
onBlur$={onBlurHandler}
class="bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 bg-gray-700 border-gray-600 placeholder-gray-400 text-white focus:ring-blue-500 focus:border-blue-500"
placeholder="Password" />
{field.error &&
{field.error}
}

)}

i get in frontend

image

my original previous error was

Type '{ value: Maybe; type: "password"; name: string; id: string; class: string; placeholder: string; autoFocus: boolean; ref: QRL<(element: FieldElement) => void>; onInput$: QRL<...>; onChange$: QRL<...>; onBlur$: QRL<...>; }' is not assignable to type 'InputHTMLAttributes'.
Types of property 'ref' are incompatible.
Type 'QRL<(element: FieldElement) => void>' is not assignable to type 'Signal<Element | undefined> | ((el: Element) => void) | undefined'.
Type 'QRL<(element: FieldElement) => void>' is not assignable to type '(el: Element) => void'.
Types of parameters 'element' and 'el' are incompatible.
Type 'Element' is not assignable to type 'FieldElement'.
Type 'Element' is missing the following properties from type 'HTMLTextAreaElement': autocomplete, cols, defaultValue, dirName, and 152 more.ts(2322)
(property) IntrinsicHTMLElements.input: InputHTMLAttributes
and my original component
{(field, props) => (


<input
{...props}
value={field.value}
type="password"
name="password"
id="password"
class="bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 bg-gray-700 border-gray-600 placeholder-gray-400 text-white focus:ring-blue-500 focus:border-blue-500"
placeholder="Password" />
{field.error &&
{field.error}
}

)}

@fabian-hiller
Copy link
Owner

Please send me a minimal reproduction on StackBlitz. Here is a template: https://stackblitz.com/edit/modular-forms-qwik?file=src/routes/login/index.tsx

@fabian-hiller fabian-hiller self-assigned this Apr 1, 2024
@fabian-hiller fabian-hiller added the question Further information is requested label Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants