-{"index.html":"<html><head><script src=\"//ej2.syncfusion.com/javascript/demos/auto-complete/data-binding/datasource.js\" type=\"text/javascript\"></script>\n<script src=\"https://cdn.syncfusion.com/ej2/dist/ej2.min.js\" type=\"text/javascript\"></script>\n <link href=\"https://cdn.syncfusion.com/ej2/material.css\" rel=\"stylesheet\">\n\n <link href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\" rel=\"stylesheet\">\n\n <style>\n body{\n touch-action:none;\n }\n </style></head><body><div class=\"stackblitz-container {{theme}}\"><div class=\"control-section col-lg-9\">\n <div id=\"local-data\" class=\"col-lg-6\" style=\"padding-top:15px\">\n <div class=\"content\">\n <h4> Local Data</h4>\n <input type=\"text\" id=\"country\">\n </div>\n </div>\n <div id=\"remote-data\" class=\"col-lg-6\" style=\"padding-top:15px\">\n <div class=\"content\">\n <h4>Remote Data</h4>\n <input type=\"text\" id=\"products\">\n </div>\n </div>\n</div>\n<div class=\"col-lg-3 property-section\">\n\t<table id=\"property\" title=\"Properties\">\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td>\n\t\t\t\t\t<input id=\"checkAutofill\" type=\"checkbox\" checked=\"true\">\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</tbody>\n\t</table>\n</div>\n\n\n\n\n\n","index.js":"{{ripple}}\n\n // initialize AutoComplete component\n var atcObj1 = new ej.dropdowns.AutoComplete({\n // bind the DataManager instance to dataSource property\n dataSource: new ej.data.DataManager({ url: 'https://ej2services.syncfusion.com/production/web-services/api/Employees', adaptor: new ej.data.WebApiAdaptor(), crossDomain: true}),\n // set the count for displays the suggestion items.\n suggestionCount: 5,\n // bind the Query instance to query property\n query: new ej.data.Query().select(['FirstName', 'EmployeeID']).take(10).requiresCount(),\n // map the appropriate columns to fields property\n fields: { value: 'FirstName' },\n // set the placeholder to AutoComplete input element\n placeholder: 'e.g. Andrew Fuller',\n // sort the resulted items\n sortOrder: 'Ascending',\n // enable the autofill property to fill a first matched value in input when press a down key\n autofill: true,\n // set the filterType to searching operation\n filterType: 'StartsWith',\n });\n atcObj1.appendTo('#products');\n\n // initialize AutoComplete component\n var atcObj2 = new ej.dropdowns.AutoComplete({\n //set the local data to dataSource property\n dataSource: window.ddCountryData,\n // map the appropriate columns to fields property\n fields: { value: 'Name' },\n // set the placeholder to AutoComplete input element\n placeholder: 'e.g. Australia',\n // sort the resulted items\n sortOrder: 'Ascending',\n // set the filterType to searching operation\n filterType: 'StartsWith',\n // enable the autofill property to fill a first matched value in input when press a down key\n autofill: true\n });\n atcObj2.appendTo('#country');\n var checkBoxObj = new ej.buttons.CheckBox({\n // set true for enable the checked state at initial rendering\n checked: true,\n // set text value for check box element.\n label: 'Autofill',\n // bind change event\n change: function (args) {\n // enable or disable the autofill in remote data AutoComplete based on CheckBox checked state\n atcObj1.autofill = args.checked;\n // enable or disable the autofill in local data AutoComplete based on CheckBox checked state\n atcObj2.autofill = args.checked;\n }\n });\n checkBoxObj.appendTo('#checkAutofill');\n\n"}
0 commit comments