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

add null handling for item label properties #681

Merged
merged 2 commits into from Jul 24, 2018

Conversation

gatanaso
Copy link
Contributor

@gatanaso gatanaso commented Jul 22, 2018

This PR fixes #680 of the vaadin-combo-box failing to render when an item property used as a label path has a null value.


This change is Reviewable

@CLAassistant
Copy link

CLAassistant commented Jul 22, 2018

CLA assistant check
All committers have signed the CLA.

@coveralls
Copy link

coveralls commented Jul 22, 2018

Pull Request Test Coverage Report for Build 3369

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.6%) to 90.514%

Files with Coverage Reduction New Missed Lines %
src/vaadin-combo-box-dropdown.html 1 97.35%
src/vaadin-combo-box-dropdown-wrapper.html 2 76.67%
Totals Coverage Status
Change from base Build 3363: -0.6%
Covered Lines: 475
Relevant Lines: 503

💛 - Coveralls

Copy link
Member

@manolo manolo 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: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @gatanaso)


src/vaadin-combo-box-dropdown-wrapper.html, line 262 at r1 (raw file):

        if (label === undefined) {
          label = item ? item.toString() : '';
        } else if (label === null) {

I feel that the correct code here should be like in the line above, set item.toString if item exists like it does with undefined.

@gatanaso gatanaso force-pushed the fix/handle-null-value-label-properties branch from 4bf812f to 67160d9 Compare July 23, 2018 06:54
@gatanaso
Copy link
Contributor Author


src/vaadin-combo-box-dropdown-wrapper.html, line 262 at r1 (raw file):

Previously, manolo (Manuel Carrasco Moñino) wrote…

I feel that the correct code here should be like in the line above, set item.toString if item exists like it does with undefined.

Thanks for the review. I have updated the PR.

Copy link
Member

@manolo manolo 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: 0 of 2 files reviewed, all discussions resolved


src/vaadin-combo-box-dropdown-wrapper.html, line 262 at r1 (raw file):

Previously, gatanaso (Goran) wrote…

Thanks for the review. I have updated the PR.

Tip: if (label === undefined || label === null) can be rewritten as if (label == null) of if (label == undefined) , but not a blocker.

Copy link
Contributor

@yuriy-fix yuriy-fix 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 2 of 2 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@yuriy-fix
Copy link
Contributor

Rebase on current master, should help with passing the build.

@gatanaso gatanaso force-pushed the fix/handle-null-value-label-properties branch from 67160d9 to e3a4e5b Compare July 23, 2018 12:29
Copy link
Member

@manolo manolo 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 2 of 2 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

Copy link
Member

@manolo manolo left a comment

Choose a reason for hiding this comment

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

Good Job! thanks for contributing

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@manolo manolo merged commit e938af8 into master Jul 24, 2018
@manolo manolo deleted the fix/handle-null-value-label-properties branch July 24, 2018 06:40
@manolo manolo removed the in review label Jul 24, 2018
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.

The vaadin-combo-box does not render when the value for item-label-path is null
6 participants