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] Incorrect display of remote dropdown #3087

Open
dabroz opened this issue Aug 18, 2024 · 4 comments
Open

[Dropdown] Incorrect display of remote dropdown #3087

dabroz opened this issue Aug 18, 2024 · 4 comments
Assignees
Labels
state/awaiting-investigation Anything which needs more investigation type/bug Any issue which is a bug or PR which fixes a bug

Comments

@dabroz
Copy link

dabroz commented Aug 18, 2024

Bug Report

This is visible even in Fomantic UI docs. I can also reproduce this locally.

Steps to reproduce

  1. Visit https://fomantic-ui.com/modules/dropdown.html#match-search-query-on-server
  2. Try searching for "linux"

Expected result

The results should not be mangled

Actual result

Results are displayed incorrectly

Testcase

Screenshot (when possible)

image image

Version

2.9 (as per fomantic-ui.com website)
Chrome 127, mac OS

@dabroz
Copy link
Author

dabroz commented Aug 18, 2024

And this is how it looks in my project after selecting a value

image

@lubber-de
Copy link
Member

Thanks for reporting. While i test a fix for all possible situations and dropdown variants, please try to add the following to your project

.ui.selection.dropdown .menu > .item:has( > .description) {
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
}

@lubber-de lubber-de added type/bug Any issue which is a bug or PR which fixes a bug state/awaiting-investigation Anything which needs more investigation labels Aug 18, 2024
@lubber-de lubber-de self-assigned this Aug 18, 2024
@dabroz
Copy link
Author

dabroz commented Aug 18, 2024

Thanks for looking into it!

However, this doesn't seem to solve this issue. Without this patch:
image
image

With this patch:
image
image

@lubber-de
Copy link
Member

@dabroz Please try to enhance the selector as follows, so the selected text matches the dropdown item list.

.ui.selection.dropdown > .text:not(.default):has( > .description),
.ui.selection.dropdown .menu > .item:has( > .description) {
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
}

However, it seems you removed the left margin from the description using custom css(?) .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state/awaiting-investigation Anything which needs more investigation type/bug Any issue which is a bug or PR which fixes a bug
Projects
None yet
Development

No branches or pull requests

2 participants