2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 03:00:54 +00:00

Add helper function to simplify reloading of field options

This commit is contained in:
Oliver Walters
2020-08-26 23:43:19 +10:00
parent 9dcc23ee4e
commit 72899530cf
2 changed files with 61 additions and 1 deletions

View File

@ -216,7 +216,20 @@
{
field: 'part',
action: function(value) {
console.log('value: ' + value);
reloadFieldOptions(
'supplier_part',
{
url: "{% url 'api-supplier-part-list' %}",
params: {
part: value,
pretty: true,
},
text: function(item) {
return item.pretty_name;
}
}
)
}
},
],