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

chore(Field.Date): add docs example on how to enable auto close #4287

Merged
merged 3 commits into from
Nov 18, 2024

Conversation

joakbjerk
Copy link
Contributor

No description provided.

Copy link

vercel bot commented Nov 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
eufemia ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 18, 2024 8:35am

Copy link
Contributor

@langz langz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make it "auto close", why does it make sense to do showCancelButton={false}?

A property named autoClose sounds more straight forward.

Or perhaps the only time we should allow auto close is when there is now show cancel button?

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@joakbjerk
Copy link
Contributor Author

To make it "auto close", why does it make sense to do showCancelButton={false}?

A property named autoClose sounds more straight forward.

Or perhaps the only time we should allow auto close is when there is now show cancel button?

Adding an autoClose prop would add more complexity for the internal handling of when the picker should close. The current code setup for that functionality in the DatePicker is written so that the picker will not auto close if the submit or reset button is displayed, as the user would have no way of actively confirming or canceling their date choice, if the calendar would close automatically

Since Field.Date has showCancelButton as true by default, so the developers will have to set showCancelButton to false, to enable the auto close behaviour. 🙏

@joakbjerk joakbjerk merged commit 1cafd1e into main Nov 18, 2024
10 checks passed
@joakbjerk joakbjerk deleted the chore/field-date-add-auto-close-example branch November 18, 2024 09:00
@tujoworker
Copy link
Member

🎉 This PR is included in version 10.57.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants