mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-14 19:15:41 +00:00
Option generation function now returns array, rather than flat text
This commit is contained in:
@ -27,7 +27,7 @@ function makeOptionsList(elements, textFunc, valueFunc, titleFunc) {
|
||||
* - titleFunc: optional function which takes an element and generates a title
|
||||
*/
|
||||
|
||||
var html = ``;
|
||||
var options = [];
|
||||
|
||||
elements.forEach(function(element) {
|
||||
|
||||
@ -45,10 +45,10 @@ function makeOptionsList(elements, textFunc, valueFunc, titleFunc) {
|
||||
title = titleFunc(element);
|
||||
}
|
||||
|
||||
html += makeOption(text, value, title);
|
||||
options.push(makeOption(text, value, title));
|
||||
});
|
||||
|
||||
return html;
|
||||
return options;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user