webpack/components/ParameterSelection/ParameterSelectionHelper.js in foreman_acd-0.9.0 vs webpack/components/ParameterSelection/ParameterSelectionHelper.js in foreman_acd-0.9.1

- old
+ new

@@ -9,12 +9,16 @@ const result = {}; fdata.map(item => result[item.id] = item.name) return (result); } -export const filterUsedParameterTypes = (options, parameters) => { +export const filterParameterTypes = (options, parameters) => { const newOptions = cloneDeep(options); + // hostparam can be used multiple times const alreadyUsed = parameters.map(item => item["type"]).filter(item => item != 'hostparam'); + + // remove already used items alreadyUsed.forEach(item => delete newOptions[item]) + return newOptions; }