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(dropdown): do not use value as name when name is empty #1209

Merged
merged 2 commits into from
Dec 22, 2019

Conversation

lubber-de
Copy link
Member

Description

In #1112 a missing name of an selection option was fetched and replaced by the value instead when converting select tags into dropdowns.
But this is not the same behavior as for a usual html select where a missing name is rendered as an empty select entry (which of course still has its individual value)

Testcase

The first entry has a value but an empty name. Standard html select would keep the empty name, while...

Broken

... FUI replaces it with the value by default
https://jsfiddle.net/mons57e2/

Fixed

... keeps an empty/non-existing name
https://jsfiddle.net/4oxpwhv2/

Closes

#1191

@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 labels Dec 6, 2019
@lubber-de lubber-de added this to the 2.8.3 milestone Dec 6, 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
Contributor

@prudho prudho 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
Contributor

@exoego exoego 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 changed the title [Dropdown] When converting selects, do not use value as name when name is empty, just as standard HTML select behaves fix(dropdown): do not use value as name when name is empty Dec 22, 2019
@y0hami y0hami merged commit 9892bcb into fomantic:develop Dec 22, 2019
@lubber-de lubber-de deleted the fix/1191/empty_names_in_select branch December 22, 2019 15:45
@lubber-de lubber-de added tag/next-release/nightly Any issue which has a corresponding PR which has been merged and is available in the nightly build and removed state/awaiting-reviews Pull requests which are waiting for reviews tag/next-release/nightly Any issue which has a corresponding PR which has been merged and is available in the nightly build labels Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/javascript Anything involving JavaScript 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.

5 participants