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

fix: ensure DatePicker initializes client side value property #2878

Merged
merged 4 commits into from
Mar 17, 2022

Conversation

vursen
Copy link
Contributor

@vursen vursen commented Mar 16, 2022

Description

Fixes DatePicker so that it initializes the web component's value property with an empty string rather than leave it to be null when DatePicker is being instantiated with no value. This is needed to prevent the value-changed event on the server side which happens as a result of Polymer converting null to "".

It pretty much reproduces the fix made for Select a while ago in 14676de#diff-1c027c9076652ce3a2c641ac7407c10cc3a87846a37ee152c27aa9fe59aad609R126-R129

The same fix will be made for TimePicker, but in a separate PR.

Part of #2691

Type of change

  • Bugfix

Checklist

  • I have read the contribution guide: https://vaadin.com/docs-beta/latest/guide/contributing/overview/
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

@vursen vursen changed the title fix: ensure DatePicker initializes value property with the initial value fix: ensure DatePicker initializes value property Mar 16, 2022
@vursen vursen changed the title fix: ensure DatePicker initializes value property fix: ensure DatePicker initializes client-side value property Mar 16, 2022
@vursen vursen force-pushed the fix/date-picker/initial-value branch from c70b474 to 2cedc9b Compare March 16, 2022 15:15
@vursen vursen force-pushed the fix/date-picker/initial-value branch from 4b52ecc to 3025f95 Compare March 16, 2022 15:15
@vursen vursen changed the title fix: ensure DatePicker initializes client-side value property fix: ensure DatePicker initializes client side value property Mar 16, 2022
@vursen vursen force-pushed the fix/date-picker/initial-value branch 3 times, most recently from 2577924 to 4b52ecc Compare March 16, 2022 15:19
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 839 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@vursen vursen merged commit a8e974c into master Mar 17, 2022
@vursen vursen deleted the fix/date-picker/initial-value branch March 17, 2022 12:30
vaadin-bot pushed a commit that referenced this pull request Mar 17, 2022
vaadin-bot pushed a commit that referenced this pull request Mar 17, 2022
vursen added a commit that referenced this pull request Mar 18, 2022
vursen added a commit that referenced this pull request Mar 18, 2022
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 23.1.0.alpha1 and is also targeting the upcoming stable 23.1.0 version.

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

Successfully merging this pull request may close these issues.

3 participants