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:
@ -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;
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
},
|
||||
],
|
||||
|
Reference in New Issue
Block a user