mounted(){
let ajax = new Ajax("https://ej2services.syncfusion.com/production/web-services/api/Orders", "GET");
ajax.send();
ajax.onSuccess = function(data){
remoteData = JSON.parse(data);
}
},
methods: {
onFiltering: function(e) {
var query = new Query();
query = (e.text !== '') ? query.where('OrderID', 'startswith', e.text, true) : query;
e.updateData(remoteData, query);
}
}, |
onFiltering: function(e) {
e.preventDefaultAction = true;
if(e.text.length>=this.$refs.autoObj.ej2Instances.minLength){
this.$refs.autoObj.ej2Instances.showSpinner();
let ajax = new Ajax("https://ej2services.syncfusion.com/production/web-services/api/Orders/?$select=CustomerID&$top=5&$filter=startswith(tolower(CustomerID),'"+e.text+"')", "GET");
ajax.send();
ajax.onSuccess = function(data){
e.updateData(JSON.parse(data).result);
}
}
} |
var actionVue = Vue.component("actionFailureTemplate", {
template: `<span class="action-failure"> Data fetch got failed</span>`,
data() {
return {
data: {}
};
}
}); |