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:
parent
705612049c
commit
fb59ef4d27
1 changed files with 9 additions and 0 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue