-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat(datepicker): added showSelectedCount
for the component
#5227
base: main
Are you sure you want to change the base?
Conversation
showSelectedCount
for the muıshowSelectedCount
for the component
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5227 +/- ##
==========================================
- Coverage 96.89% 96.86% -0.03%
==========================================
Files 29 29
Lines 3381 3385 +4
Branches 1401 1416 +15
==========================================
+ Hits 3276 3279 +3
+ Misses 105 104 -1
- Partials 0 2 +2 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ This pull request was sent to the PullRequest network for review. Expert reviewers are now being matched to your request based on the code's requirements. Stay tuned!
What to expect from this code review:
- Comments posted to any areas of potential concern or improvement.
- Detailed feedback or actions needed to resolve issues that are found.
- Turnaround times vary, but we aim to be swift.
@mertJF you can click here to see the review status or cancel the code review job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PullRequest Breakdown
Reviewable lines of change
+ 49
- 3
54% TypeScript (tests)
23% TSX
21% TypeScript
2% TSX (tests)
Type of change
Feature - These changes are adding a new feature or improvement to existing code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
This PR introduces a new feature to the component: the ability to customize how multiple selected dates are displayed in the input field. By adding the
showSelectedCount
prop, developers can choose between displaying a count of selected dates or a comma-separated list.Problem
The existing behavior of displaying a date count in the input field can be less informative for users who need to see the exact dates that have been selected, especially when dealing with a large number of selected dates.
Changes
A new boolean prop,
showSelectedCount
, has been added to the component.The component's rendering logic has been updated to conditionally render either the date count or a comma-separated list based on the value of the
showSelectedCount
prop.The
showSelectedCount
prop defaults to true for backward compatibility.I've added unit tests to cover the new functionality and ensure that existing functionality remains unaffected.
Screenshots
showSelectedCount
: trueshowSelectedCount
: falseContribution checklist