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 incorrectly reset selectedItem when custom value allowed #724

Merged
merged 1 commit into from Sep 25, 2018

Conversation

web-padawan
Copy link
Member

@web-padawan web-padawan commented Sep 25, 2018

Fixes #622

Fixes vaadin/vaadin-time-picker#73


This change is Reviewable

Copy link
Contributor

@platosha platosha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @web-padawan)


src/vaadin-combo-box-mixin.html, line 777 at r1 (raw file):

      const valueIndex = this._indexOfValue(value, this.filteredItems);
      const item = valueIndex > -1 && this.filteredItems[valueIndex];
      this.selectedItem = item ? item : null;

false should be a valid item to select, I think. Would be cleaner to check for item !== undefined instead.

Copy link
Member Author

@web-padawan web-padawan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @platosha)


src/vaadin-combo-box-mixin.html, line 777 at r1 (raw file):

Previously, platosha (Anton Platonov) wrote…

false should be a valid item to select, I think. Would be cleaner to check for item !== undefined instead.

Done.

Copy link
Contributor

@platosha platosha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

Copy link
Member

@tomivirkki tomivirkki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 2 files at r1, 1 of 1 files at r3.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@tomivirkki tomivirkki merged commit 13b53dd into master Sep 25, 2018
@tomivirkki tomivirkki deleted the fix/622 branch September 25, 2018 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants