Fomantic-UI icon indicating copy to clipboard operation
Fomantic-UI copied to clipboard

[Dropdown] Incorrect display of remote dropdown

Open dabroz opened this issue 1 year ago • 4 comments

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 avatar Aug 18 '24 03:08 dabroz

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

image

dabroz avatar Aug 18 '24 03:08 dabroz

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 avatar Aug 18 '24 22:08 lubber-de

Thanks for looking into it!

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

With this patch: image image

dabroz avatar Aug 18 '24 22:08 dabroz

@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(?) .

lubber-de avatar Aug 21 '24 18:08 lubber-de