Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dojo Autocomplete

I can use dijit.form.FilteringSelect to show the Dropdown box. But It requests all data from the store dojo.data.ItemFileReadStore at once that I Don't want. I want it to query the store with the current value of the textbox and show the Autocompleter options.

like image 977
Neel Basu Avatar asked Apr 15 '26 20:04

Neel Basu


1 Answers

A more complete example as above but equals of valid. But in my case I use QueryReadStore

 this.store = new dojox.data.QueryReadStore({
                url: 'url',
                sortFields :  [{attribute: 'attribute', descending: true}],
                requestMethod : "get"}
            );

callSuggest : function(){
        var fetch = {
                query: {attribute: "*"},
                queryOptions: {
                    ignoreCase: true,
                    deep: true
                },
                serverQuery: this.searchParam,
                onComplete: dojo.hitch(this, function(result, dataObject){
                    //do something
                }),
                onError: function(errText){
                    console.error('error');
                }
            };
        this.store.fetch(fetch);
    },
like image 98
Juan Picado Avatar answered Apr 17 '26 09:04

Juan Picado



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!