Merge pull request #1349 from SchrodingersGat/used-in-filter

Enable filtering for "used in" table
This commit is contained in:
Oliver 2021-02-23 13:43:45 +11:00 committed by GitHub
commit 615e2f8271
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

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

View File

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