huntabyte / bits-ui

The headless components for Svelte.
https://bits-ui.com
MIT License
953 stars 70 forks source link

fix: date pickers clear #549

Closed wysher closed 1 month ago

wysher commented 1 month ago

this PR solves two issues:

I still have issue with date range field which will not clear segments even when value, startValue and endValue clears (for date field it works fine). I'm not sure how segments get updates after value changes - I need some help here. Maybe it must be done on melt-ui.

changeset-bot[bot] commented 1 month ago

⚠️ No Changeset found

Latest commit: e9ddf4c1a0e7903064c33b4bfa814fc2d0ec3a0b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

github-actions[bot] commented 1 month ago
built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
bits-ui ✅ Ready (View Log) Visit Preview e9ddf4c1a0e7903064c33b4bfa814fc2d0ec3a0b
huntabyte commented 1 month ago

Hey @wysher thanks a ton for this! Would you mind adding a regression test to the tests for this? Just to ensure we know it doesn't break in the future!

wysher commented 1 month ago

Hey @huntabyte. I don't mind adding test cases, but there's no tests for date pickers at the moment and sadly I don't have enough time to write them from scratch.

I've checked issue with refreshing input segments when date-range-field value was cleared on melt-ui, and issue repeats there. So, most likely it needs to be fixed on melt-ui.

huntabyte commented 1 month ago

No worries, I will give this a review soon to confirm everything looks good!