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

[Dropdown] Allow a real zero to be a selectable value in 'set selected' #370

Merged
merged 1 commit into from
Jan 11, 2019

Conversation

lubber-de
Copy link
Member

@lubber-de lubber-de commented Jan 8, 2019

Description

When dropdown list has an entry with given value "0", is is not selectable via set selected method

In the code, there already was a triple equal check, but this made a real 0 invalid resulting in always comparing String to Number (which of course is false)

Testcase

Unfixed (from original SUI issue)

http://jsfiddle.net/budiadiono/fcsbashq/1/

Fixed

http://jsfiddle.net/g0f7y9pq/

Closes

Semantic-Org/Semantic-UI#5354
Semantic-Org/Semantic-UI#5638

@lubber-de lubber-de added type/bug Any issue which is a bug or PR which fixes a bug lang/javascript Anything involving JavaScript state/awaiting-reviews Pull requests which are waiting for reviews tag/sui-issue Taken from an existing Issue/PR of SUI labels Jan 8, 2019
@lubber-de lubber-de added this to the 2.7.x milestone Jan 8, 2019
Copy link
Member

@y0hami y0hami left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@ColinFrick ColinFrick left a comment

Choose a reason for hiding this comment

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

LGTM

@y0hami y0hami merged commit dfa1ea1 into fomantic:develop Jan 11, 2019
@lubber-de lubber-de modified the milestones: 2.7.x, 2.7.2 Jan 11, 2019
@lubber-de lubber-de removed the state/awaiting-reviews Pull requests which are waiting for reviews label Jan 11, 2019
@y0hami y0hami mentioned this pull request Feb 4, 2019
@lubber-de lubber-de deleted the fix/5354/allow_zero_set_selected branch February 5, 2019 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/javascript Anything involving JavaScript tag/sui-issue Taken from an existing Issue/PR of SUI type/bug Any issue which is a bug or PR which fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants