Skip to content

Commit edc959c

Browse files
jrichter1dgolovin
authored andcommitted
Fix clear all deselecting components while dependents are still selected
1 parent d95157c commit edc959c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

browser/pages/selection/controller.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,22 @@ class SelectionController {
5252
}
5353

5454
toggleSelection(type) {
55+
let deselectedComponents = [];
5556
this.componentsInChannel(this.channel_tab).forEach((node)=>{
5657
if(type==='all') {
5758
if (node.isInstallable && node.isNotDetected()) {
5859
node.selectedOption = 'install';
5960
}
6061
} else if(type==='none') {
6162
node.selectedOption = 'detected';
63+
deselectedComponents.push(node);
6264
}
6365
});
66+
for (const node of deselectedComponents) {
67+
if (node.references > 0) {
68+
node.selectedOption = 'install';
69+
}
70+
}
6471
}
6572

6673
channelBadge(tab) {

0 commit comments

Comments
 (0)