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

Input type checkbox component export inner prop as FormCheck instead of HTMLElement #374

Closed
SimonNegrin opened this issue Sep 3, 2021 · 8 comments · Fixed by #379
Closed

Comments

@SimonNegrin
Copy link

I supposed this is an error and it should export the subjacent HTMLElement. I've taken a look to the FormCheck component and I think the fix would be change the lines with bind:this={inner} by bind:inner.

@bestguy
Copy link
Owner

bestguy commented Sep 3, 2021

Hi @SimonNegrin ,
Not sure what you are looking to do, the inner ref is to allow access to things like triggering focus on the inner input element, which otherwise would not be available. This is used in Input as well.

@SimonNegrin
Copy link
Author

Hi!

I'm trying to use native controls validation and I need access to the HTMLInputElement validity property. When I use an Input type text there is no problem because the inner prop is exported as HTMLInputElement but this is not de case when the Input is a type checkbox.

@bestguy
Copy link
Owner

bestguy commented Sep 6, 2021

Ah! I see the issue now. When you use Input type="checkbox", this line is incorrect:

bind:this={inner}

It should be:

bind:inner={inner}

Thanks for the find/explanation, we'll fix up today.

@bestguy
Copy link
Owner

bestguy commented Sep 6, 2021

Merged, will release soon

@bestguy bestguy reopened this Sep 6, 2021
@SimonNegrin
Copy link
Author

Ok, thank you!! 🎉🎉 This will ease so much my forms validation.

@bestguy
Copy link
Owner

bestguy commented Sep 7, 2021

Released in 5.6.3

@demetrius-mp
Copy link
Contributor

@bestguy, shouldnt this issue be closed?

@bestguy
Copy link
Owner

bestguy commented Feb 18, 2022

Yep, thanks, I usually give issue opener chance to confirm & close, but this was left open.

@bestguy bestguy closed this as completed Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants