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): set placeholdertext regardless of values #3128

Merged
merged 2 commits into from
Nov 28, 2024

Conversation

lubber-de
Copy link
Member

@lubber-de lubber-de commented Nov 22, 2024

Description

In situations where values are given for a dropdown, but the list is empty (or no value is selected), and also allowAdditions:true is set, a given placeholder wont be shown. That's because internally the dropdownlist does not get cleared when allowAdditions is true which also does not (re-)set the placeholder.

By always trying to show a placeholder this situation gets fixed.

Testcase

Broken

https://jsfiddle.net/mkov7swt/

Fixed

https://jsfiddle.net/lubber/ws65erf2/12/

Closes

#3127

@lubber-de lubber-de added type/bug Any issue which is a bug or PR which fixes a bug state/awaiting-reviews Pull requests which are waiting for reviews javascript Pull requests that update Javascript code labels Nov 22, 2024
@lubber-de lubber-de added this to the 2.9.4 milestone Nov 22, 2024
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

@lubber-de lubber-de merged commit 1d9a088 into fomantic:develop Nov 28, 2024
11 checks passed
@lubber-de lubber-de deleted the dropdownPlaceholderAnyway branch November 28, 2024 14:37
@lubber-de lubber-de removed the state/awaiting-reviews Pull requests which are waiting for reviews label Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code 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.

2 participants