mirror of
https://github.com/bitwarden/clients.git
synced 2026-07-01 21:10:49 +08:00
make checkbox selection updates immutable (#17939)
Some checks failed
Chromatic / Check PR run (push) Has been cancelled
Scan / Check PR run (push) Has been cancelled
Testing / Run tests (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (macos-14) (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (ubuntu-22.04) (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (windows-2022) (push) Has been cancelled
Testing / Rust Coverage (push) Has been cancelled
Chromatic / Chromatic (push) Has been cancelled
Scan / Checkmarx (push) Has been cancelled
Scan / Sonar (push) Has been cancelled
Testing / Upload to Codecov (push) Has been cancelled
Some checks failed
Chromatic / Check PR run (push) Has been cancelled
Scan / Check PR run (push) Has been cancelled
Testing / Run tests (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (macos-14) (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (ubuntu-22.04) (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (windows-2022) (push) Has been cancelled
Testing / Rust Coverage (push) Has been cancelled
Chromatic / Chromatic (push) Has been cancelled
Scan / Checkmarx (push) Has been cancelled
Scan / Sonar (push) Has been cancelled
Testing / Upload to Codecov (push) Has been cancelled
This commit is contained in:
parent
14dd732b52
commit
4e913df0ff
@ -143,16 +143,14 @@ export class AllApplicationsComponent implements OnInit {
|
||||
|
||||
onCheckboxChange = (applicationName: string, event: Event) => {
|
||||
const isChecked = (event.target as HTMLInputElement).checked;
|
||||
if (isChecked) {
|
||||
this.selectedUrls.update((selectedUrls) => {
|
||||
selectedUrls.add(applicationName);
|
||||
return selectedUrls;
|
||||
});
|
||||
} else {
|
||||
this.selectedUrls.update((selectedUrls) => {
|
||||
selectedUrls.delete(applicationName);
|
||||
return selectedUrls;
|
||||
});
|
||||
}
|
||||
this.selectedUrls.update((selectedUrls) => {
|
||||
const nextSelected = new Set(selectedUrls);
|
||||
if (isChecked) {
|
||||
nextSelected.add(applicationName);
|
||||
} else {
|
||||
nextSelected.delete(applicationName);
|
||||
}
|
||||
return nextSelected;
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user