dnbexperience / eufemia

DNB Design System
https://eufemia.dnb.no
Other
53 stars 32 forks source link

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

Closed joakbjerk closed 4 days ago

vercel[bot] commented 4 days ago

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
codesandbox-ci[bot] commented 4 days ago

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 commented 4 days ago

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. 🙏

tujoworker commented 4 hours ago

:tada: This PR is included in version 10.57.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: