vitalets / x-editable

In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
http://vitalets.github.io/x-editable
MIT License
6.51k stars 1.72k forks source link

typeahead input type not working with typeahead.js 0.10.5 #854

Open trustarun opened 8 years ago

trustarun commented 8 years ago

I' am trying to use typeahead input type with x-editable

I am trying with the sample code available on demo page http://vitalets.github.io/x-editable/demo-bs3.html

<a href="#" id="state2" data-type="typeaheadjs" data-pk="1" data-placement="right" data-title="Start typing State.."></a>

$('#state2').editable({
        value: 'California',
        typeahead: {
            name: 'state',
            local: ["Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Dakota","North Carolina","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming"]
        }
    });

The above code work fine with typeahead.js 0.9.3 , coming with downloaded xeditable package, But my application using typeahead.js 0.10.5.

With the recent typeahead version, when user type a country name, No suggestion is shown.

When I revret to the lower version i,e 0.9.3 it start working fine .

But I can't downgrade it as I am extensively using typeahead across my application, which start breaking with the downgrade .

Can you please suggest some workaround for this problem .

leolandotan commented 7 years ago

I'm also experiencing this in 0.11.1. Any updates on this fix?