The error from console is pointing on virtual list creation line:
var virtualList = app.virtualList.create({
Error from console:
VM355:7 Uncaught SyntaxError: Unexpected token ,
at Template7Class.compile (template7.esm.js:688)
at Function.compile (template7.esm.js:756)
at new VirtualList (virtual-list-class.js:100)
at _construct (construct.js:19)
at Object.create (constructor-methods.js:20)
at FxApp.studentsList (app.js:717)
at eval (app.js:708)
at Object.eval [as success] (app.js:535)
at fireCallback (request.js:56)
at XMLHttpRequest.onload (request.js:239)
My whole virtual list code:
var virtualList = app.virtualList.create({
// List Element
el: ".virtual-list",
// Pass array with items
items: [{
name: "test",
category: "test",
progress:"test",
pesel:"test"
}],
// Custom search function for searchbar
searchAll: function (query, items) {
var found = [];
for (var i = 0; i < items.length; i++) {
if (
items[i].name.toLowerCase().indexOf(query.toLowerCase()) >= 0 ||
query.trim() === ""
)
found.push(i);
}
return found; //return array with mathced indexes
},
itemTemplate:
`<li class="swipeout">
<div class="swipeout-content">
<div class="item-link item-content">
<div class="item-inner">
<div class="item-title-row">
<div class="item-title">{{name}}</div>
<div class="item-after">{{category}}, {{progress}}/30, {{}}</div>
</div>
</div>
</div>
</div>
<div class="swipeout-actions-left">
<a href="/student-info/{{pesel}}/" class="color-green swipeout-overswipe">Szczegóły</a>
</div>
<div class="swipeout-actions-right">
<a href="#" data-id="{{pesel}}" data-student="{{name}}" class="back color-blue swipeout-overswipe student-link text-white">Dodaj</a>
</div>
</li>`,
// Item height
height: app.theme === "ios" ? 63 : app.theme === "md" ? 73 : 46,
});
I have no idea why this isn’t working. Any help will be appreciated