2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-10 23:14:13 +00:00

Refactor model renderer functions

This commit is contained in:
Oliver Walters
2022-04-05 00:27:37 +10:00
parent 15253435af
commit 58003bc2cb
3 changed files with 32 additions and 30 deletions

View File

@ -132,6 +132,7 @@ function updateSearch() {
renderStockItem,
{
url: '/stock/item',
render_location_detail: true,
}
);
}
@ -232,6 +233,9 @@ function addSearchQuery(key, title, query_url, query_params, render_func, render
query_params.offset = 0;
query_params.limit = user_settings.SEARCH_PREVIEW_RESULTS;
// Do not display "pk" value for search results
render_params.render_pk = false;
// Add the result group to the panel
$('#offcanvas-search').find('#search-results').append(`
<div class='search-result-group-wrapper' id='search-results-wrapper-${key}'></div>