diff --git a/docs/build/app.js b/docs/build/app.js index 4fb8553..b61cf7a 100644 --- a/docs/build/app.js +++ b/docs/build/app.js @@ -11434,17 +11434,17 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ limit: 10, options: [], sectionConfigs: { - "default": { + default: { limit: 6, onSelected: function onSelected(item) { - alert('default: ' + item.label); + alert("default: " + item.label); } }, - "blog": { + blog: { limit: 3, - type: 'url-section', + type: "url-section", onSelected: function onSelected(item) { - alert('url: ' + item.item.url); + alert("url: " + item.item.url); } } }, @@ -11462,11 +11462,11 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ methods: { onInputChange: function onInputChange(text) { this.filteredOptions = [{ - "data": ["clifford kits", "friendly chemistry", "phonics", "life of fred", "life of fred math", "magic school bus", "math mammoth light blue", "handwriting", "math", "minecraft", "free worksheets", "4th grade", "snap circuits", "bath toys", "channies", "fred", "lego", "math life of fred", "multiplication", "thinking tree"] + data: ["clifford kits", "friendly chemistry", "phonics", "life of fred", "life of fred math", "magic school bus", "math mammoth light blue", "handwriting", "math", "minecraft", "free worksheets", "4th grade", "snap circuits", "bath toys", "channies", "fred", "lego", "math life of fred", "multiplication", "thinking tree"] }, { - "label": "Blog", - "name": "blog", - "data": [{ "url": "http://bla.com/1", "value": "blog link 1" }, { "url": "http://bla.com/2", "value": "blog link 2" }, { "url": "http://bla.com/3", "value": "blog link 3" }, { "url": "http://bla.com/4", "value": "blog link 4" }] + label: "Blog", + name: "blog", + data: [{ url: "https://blog.educents.com/best-educational-games-2017-inchimals/", value: "The Best Educational Games and Toys of 2017: Inchimals" }, { url: "https://blog.educents.com/reading-exploring-world-through-literature/", value: "Family Read-Alouds: Exploring the World Through Literature" }] }]; } } @@ -11820,6 +11820,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ this.computedSize = 0; this.suggestions.forEach(function (section) { + if (!section.data) return; var n = _this3.getSectionName(section); var t; if (_this3.sectionConfigs[n] && _this3.sectionConfigs[n].type) { diff --git a/package.json b/package.json index b910d34..9e71f60 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-autosuggest", - "version": "0.0.2-beta.7", + "version": "0.0.2-beta.8", "description": "Vue autosuggest component.", "main": "dist/index.js", "engines": {