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

Form buttons #167

Merged
merged 2 commits into from
Jul 20, 2022
Merged

Form buttons #167

merged 2 commits into from
Jul 20, 2022

Conversation

jjagielka
Copy link
Contributor

πŸ“‘ Description

Form buttons: Radio, Checkbox, Toggle rewritten again.

I can't make the svelte component 'inheritance' work well so needed another code structure.

Svelte compiler is strict in checking the binding and does not allow bind:checked to input type="radio".

On the other hand there's a known svelte bug of not properly handling bind:group for input type="checkbox" when it's wrapped in the custom component.

The above prevents in practice the usage of one file all input types support.

This PR adds as well a follow disable to the label component so it is not needed to handle that in checkbox or radio.

Toggle is just a special case of checkbox and is implemented as <Checkbox custom={true} ....

βœ… Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed
  • My pull request is based on the latest commit/version

β„Ή Additional Information

on:click is not omitted this time.

@vercel
Copy link

vercel bot commented Jul 20, 2022

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Updated
flowbite-svelte βœ… Ready (Inspect) Visit Preview Jul 20, 2022 at 4:33PM (UTC)
flowbite-svelte-update βœ… Ready (Inspect) Visit Preview Jul 20, 2022 at 4:33PM (UTC)

@shinokada
Copy link
Collaborator

Thank you for the PR. It has been merged.

@shinokada
Copy link
Collaborator

Please create a PR when you complete Radio in dropdown and Checkbox in dropdown

Thank you for your work.

@jjagielka jjagielka deleted the form-buttons branch July 20, 2022 21:44
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 this pull request may close these issues.

None yet

2 participants