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 field improvements #78

Open
1 of 2 tasks
Suyashtnt opened this issue Sep 30, 2023 · 6 comments
Open
1 of 2 tasks

Form field improvements #78

Suyashtnt opened this issue Sep 30, 2023 · 6 comments

Comments

@Suyashtnt
Copy link

Suyashtnt commented Sep 30, 2023

The current DateField & Textfield components have quite a few issues:

  • You can't set an error property on DateField
  • DateFields change year/month buttons are causing forms to be submitted
@KTibow
Copy link
Owner

KTibow commented Sep 30, 2023

  1. I'll fix that
  2. I'll probably fix that
  3. I'll probably fix that
  4. Intentional, to prevent bloat.
    Create a div after with the padding and height you want. This can also help you prevent layout shift.
  5. Can't you use extraOptions
  6. How am I supposed to fix that

@Suyashtnt
Copy link
Author

  • You can't set an error message nor helper message for either, which is vital for error validation.

Could you give an example of 4?

for 5, then why can DateField set it as required?

  1. isn't there a way to set the overflow to visible?

@KTibow
Copy link
Owner

KTibow commented Sep 30, 2023

Going to push a commit that addresses 1 and 5 soon

Could you give an example of 4?

<div style="display: flex;flex-direction: column;gap: 0.25rem;">
  <TextField name="Field" />
  <div style="padding: 0px 1rem;color: rgb(var(--m3-scheme-on-surface-variant));" class="m3-font-body-small">Supporting text</div>
</div>

isn't there a way to set the overflow to visible?

It's not part of DateField though, it's part of Dialog, so you need to configure overflow visible with some css there

@KTibow
Copy link
Owner

KTibow commented Sep 30, 2023

Also the reason DateField could be set to required or not required was that the "clear" button depends on it

@KTibow
Copy link
Owner

KTibow commented Jan 20, 2024

Please update the original issue description to only include things that are still relevant

@Suyashtnt
Copy link
Author

Working on the site that uses m3-svelte again and came across some of the issues again. Decided to actually updated it lol

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

No branches or pull requests

2 participants