Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

157
Visualizações
Semantic UI multiselect searchable dropdown not working with comma-separated texts

I'm running into a very weird issue with a Semantic UI multi-select searchable dropdown.

Basically, I'm able to add and delete items from the dropdown without any problem. However, while adding items consistently triggers the onChange jQuery listener, there are times where deleting items does not trigger the onChange jQuery listener. The listener is not triggered when deleting dropdown options that have a comma (e.g., selecting "Tokyo, Japan" from the dropdown will trigger the listener - so far so good, the listener is always triggered with added elements - but when we click "X" to erase this option, it is deleted, but the listener is not triggered.

To be clear, I can delete items with commas in their text, but it does not trigger the onChange listener when it should.

The dropdown is illustrated below with 3 possible options: dropdown image

My code looks like:

HTML (note that the possible dropdown options are added dynamically through JS during runtime and that the options are added adequately, as the picture shows):

    <div class="ui fluid search selection dropdown" id="myid">
        <input type="hidden" name="">
        <i class="dropdown icon"></i>
        <div class="default text">Some default text</div>
        <div class="menu">
        </div>
    </div>

JS:

$('.ui.dropdown').dropdown({ // SEMANTIC UI LISTENER
    onChange: function() {console.log("triggered")}
});

Notice the onChange listener - it is this listener that I thought would be triggered whenever we delete or select items from the dropdown. The way I detect whether it is triggered is simply through console logging.

Any advice is appreciated.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda