2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-29 12:06:44 +00:00

Enable filtering for "used in" table

This commit is contained in:
Oliver Walters 2021-02-23 13:23:23 +11:00
parent 791b14920a
commit 39d4ddd845
2 changed files with 4 additions and 3 deletions

View File

@ -22,12 +22,13 @@
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
loadSimplePartTable('#used-table', loadPartTable('#used-table',
'{% url "api-part-list" %}', '{% url "api-part-list" %}',
{ {
params: { params: {
uses: {{ part.pk }}, uses: {{ part.pk }},
} },
filterTarget: '#filter-list-usedin',
} }
); );

View File

@ -325,7 +325,7 @@ function loadPartTable(table, url, options={}) {
filters[key] = params[key]; filters[key] = params[key];
} }
setupFilterList("parts", $(table)); setupFilterList("parts", $(table), options.filterTarget || null);
var columns = [ var columns = [
{ {