Wizard: Group modules by name, but sort by stream

This ensures that rendered modules are grouped by name, but the order of their module stream versions is desceding.
This commit is contained in:
regexowl 2025-05-01 17:13:10 +02:00 committed by Lucas Garfield
parent 705612049c
commit fb59ef4d27

View file

@ -683,6 +683,15 @@ const Packages = () => {
];
});
// group by name, but sort by application stream in descending order
unpackedData.sort((a, b) => {
if (a.name === b.name) {
return (b.stream ?? '').localeCompare(a.stream ?? '');
} else {
return a.name.localeCompare(b.name);
}
});
if (toggleSelected === 'toggle-available') {
if (activeTabKey === Repos.INCLUDED) {
return unpackedData.filter((pkg) => pkg.repository !== 'recommended');