mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Option generation function now returns array, rather than flat text
This commit is contained in:
parent
02d17378a6
commit
2037474fad
@ -27,7 +27,7 @@ function makeOptionsList(elements, textFunc, valueFunc, titleFunc) {
|
|||||||
* - titleFunc: optional function which takes an element and generates a title
|
* - titleFunc: optional function which takes an element and generates a title
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var html = ``;
|
var options = [];
|
||||||
|
|
||||||
elements.forEach(function(element) {
|
elements.forEach(function(element) {
|
||||||
|
|
||||||
@ -45,10 +45,10 @@ function makeOptionsList(elements, textFunc, valueFunc, titleFunc) {
|
|||||||
title = titleFunc(element);
|
title = titleFunc(element);
|
||||||
}
|
}
|
||||||
|
|
||||||
html += makeOption(text, value, title);
|
options.push(makeOption(text, value, title));
|
||||||
});
|
});
|
||||||
|
|
||||||
return html;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user