diff --git a/src/routes/api/v1/items.ts b/src/routes/api/v1/items.ts index 37a8465..57487ea 100644 --- a/src/routes/api/v1/items.ts +++ b/src/routes/api/v1/items.ts @@ -11,6 +11,9 @@ async function get(req: Request, res: Response) { if (req.query.order === undefined) { req.query.order = 'asc'; } + if(req.query.search === undefined) { + req.query.search = ''; + } if (req.query.id) { // Check if number is a valid integer diff --git a/static/js/itemPageHandler.js b/static/js/itemPageHandler.js index f59af5f..0353334 100644 --- a/static/js/itemPageHandler.js +++ b/static/js/itemPageHandler.js @@ -59,8 +59,11 @@ function dataResponseHandler(res) { item.SKU = `

${item.SKU}

` }); ///// --------------------------------- ///// - + setTimeout(() => { + activateTooltips(); + }, 200); return {"rows": json, total: total, totalNotFiltered: totalNotFiltered, totalRows: total}; + } loadPageData()