Semantic-ui: [Dropdown] How to show loading mark for dropdown list?

Created on 23 Dec 2019  路  10Comments  路  Source: Semantic-Org/Semantic-UI

Expected Result

First of all, I am so excited to use Semantic UI.
I have one problem with multiple dropdown.
I am using dropdown for selecting cities from USA.
Totally, it has around 28,000 items and it makes lazy loading for selecting and searching for city name.
Is there any way to show loading mark when Dropdown loads all items and search so let customers know it's still working?
Currently, it shows result in 5~8 seconds which is really not good for customers.

Actual Result

Version

2.4.1

Most helpful comment

Aha, there he is! I was going to suggest leadstar go post the issue on the fomantic repo because it is actively maintained and has very helpful (and faster to respond) users :)

All 10 comments

Have you tried putting an icon in it? It looks like the icon will turn into a loader

Screen record from 2019-12-23 08 12 33

@GammaGames Thanks for your comment.
How can I add that icon to dropdown?

The example I linked to has a example for search:

<div class="ui search">
  <div class="ui left icon input">
    <input class="prompt" type="text" placeholder="Search GitHub">
    <i class="github icon"></i>
  </div>
</div>

I realized you said you are using a dropdown, not search. The remote content example for search functionality with remote content, why not have an empty dropdown and then filter the list of towns with the entered string?

@GammaGames
I am using remote content dropdown but have some minor issue.
List doesn't update even I type nothing existing.
FYI, here's the link to screenshot. https://screencast.com/t/MCgW9ObzI2CT
Thanks.

<div class="form-group col-md-12"> <label class="text-muted">Location (optional) </label><br/> <div class="ui location fluid search semantic selection dropdown"> <input type="hidden" name="campaign_location"> <div class="default text">Your current city/state</div> <i class="dropdown icon"></i> </div> </div>

Hi, @GammaGames
Any idea for this?

@leadstar116 See the following example (uses the community fork https://github.com/fomantic/Fomantic-UI 2.8.3, but should work with SUI 2.4 as well)
https://jsfiddle.net/aoqs729v/
loading_dropdown

Aha, there he is! I was going to suggest leadstar go post the issue on the fomantic repo because it is actively maintained and has very helpful (and faster to respond) users :)

Thank you, guys!
Sorry for the late response but this helped me...

To force loader on remote (multiple) search dropdown if not visible (right "caret down" icon unused) :

css:

.ddloader {
        visibility: hidden;
    }

#yourDropdown.loading .ddloader {
        visibility: visible;
    }

Jquery :
$('#yourDropdown input:first-child ').after('<i class="dropdown icon ddloader"></i>');

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davialexandre picture davialexandre  路  3Comments

mixerp picture mixerp  路  3Comments

deneuxa picture deneuxa  路  3Comments

sarbona picture sarbona  路  3Comments

ghost picture ghost  路  3Comments