-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix(date-picker): check properties on first render of calendar #18019
fix(date-picker): check properties on first render of calendar #18019
Conversation
✅ Deploy Preview for v11-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for v11-carbon-react ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #18019 +/- ##
=======================================
Coverage 81.81% 81.81%
=======================================
Files 404 404
Lines 14085 14085
Branches 4409 4380 -29
=======================================
Hits 11523 11523
+ Misses 2400 2399 -1
- Partials 162 163 +1 ☔ 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.
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.
LGTM!
8713091
Closes #18018
Properties applied to the
date-picker
that don't have default values aren't applied to on the first render and are only checked in theupdated
cycle. Hence why it works in storybook when the properties are applied once thedate-picker
has been rendered.Changelog
Changed
_setCalendar()
function that sets the calendar_instantiateDatePicker()
that will call_setCalendar()
and apply them on the first render_setCalendar()
in theupdated()
cycle that checks for changedPropertiesTesting / Reviewing
run storyook locally and apply the properties (
open
,min-date
, etc) directly in the playground story code indate-picker.stories.ts
and see if they are applied whendate-picker
first rendersexample: