CreateImageWizard: fix packages addAll button

When clicking the packages add all button the list of available packages
did not get added to the list of chosen packages. Now the chosen
packages and available packages are concatenated together.
This commit is contained in:
Jacob Kozol 2021-10-25 16:56:58 +02:00 committed by Tom Gundersen
parent d779dd0ad7
commit 7e8911a40c

View file

@ -63,7 +63,7 @@ const Packages = ({ defaultArch, ...props }) => {
chosenOptionsTitle="Chosen packages"
addSelected={ packageListChange }
removeSelected={ packageListChange }
addAll={ packageListChange }
addAll={ (available, chosen) => packageListChange([], chosen.concat(available)) }
removeAll= { (newAvailablePackages) => packageListChange(
newAvailablePackages,
packagesSelected.filter((item) => !mapComponentToPackage(item)?.name?.includes(filterSelected))