danielfarrell / bootstrap-combobox

A combobox plugin that works with twitter bootstrap
849 stars 328 forks source link

The typed by user value disappear after moving focus to different element #260

Open lwebzem opened 5 years ago

lwebzem commented 5 years ago

I put combobox on my page, I can select value from dropdown and it will stay. However if I type the value that is not in dropdown, after moving focus to different element by clicking somewhere else the typed value will disappear. I see the same behavior on your demo page http://bootstrap-combobox-test.herokuapp.com/

Can you help please to resolve this? Thanks. Leo.

tiesont commented 5 years ago

This is configured via the clearIfNoMatch option (see https://github.com/danielfarrell/bootstrap-combobox#options). Set that to false:

$('your selector').combobox({ clearIfNoMatch: false });
lwebzem commented 5 years ago

Thanks for the quick response , I updated but still have the same issue:

    $(document).ready(function(){
      $('.combobox').combobox({ clearIfNoMatch: false });

    });
Thanks
mattosinski commented 5 years ago

I had the same issue; the clearIfNoMatch var was not in bootstrap-combobox.js (v1.1.8). I re-downloaded the js, which solved the issue.