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

Wrong FormKitButtonSlots type #895

Closed
KamilBeda opened this issue Aug 16, 2023 · 1 comment
Closed

Wrong FormKitButtonSlots type #895

KamilBeda opened this issue Aug 16, 2023 · 1 comment
Labels
🐛 bug Verified bug by team 🚀 release-ready Feature or fix is complete and on an upcoming release branch

Comments

@KamilBeda
Copy link

Reproduction

https://formkit.link/5bd856812ec78cfc153343a3d320a9bf

Describe the bug

I've noticed there is a problem with FormKitButtonSlots type. When I use input slot I get TypeScript error Property 'input' does not exist on type FormKitButtonSlots. That's clearly not true because I see it's switching button input to anything i put inside slot.
I think the source of this issue is in type declaration:

export declare type FormKitButtonSlots<Props extends FormKitInputs<Props>> = Omit<FormKitBaseSlots<Props>, 'input' | 'help'> & {
           default: FormKitSlotData<Props>;
       };

I don't rly get why input and help slots are omited, docs marks them as valid button sections -> https://formkit.com/inputs/button#sections

Environment

• OS: N/A
• Browser: N/A
• Version [e.g. 22]

@KamilBeda KamilBeda added ⛑ Needs triage The issue has not yet been examined by the FormKit team. 🐛 bug-report Bug is reported, but not verified by team labels Aug 16, 2023
@justin-schroeder justin-schroeder added 🐛 bug Verified bug by team 🚀 release-ready Feature or fix is complete and on an upcoming release branch and removed 🐛 bug-report Bug is reported, but not verified by team ⛑ Needs triage The issue has not yet been examined by the FormKit team. labels Aug 16, 2023
@justin-schroeder
Copy link
Member

Yep, this is just wrong. Should only omit inner. This is fixed in the release/0.18.3 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Verified bug by team 🚀 release-ready Feature or fix is complete and on an upcoming release branch
Projects
None yet
Development

No branches or pull requests

3 participants