mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix crash with NamespaceSelectFilter
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
f0b26be79a
commit
e762c8d4d9
@ -46,7 +46,14 @@ export class NamespaceSelectFilterModel {
|
||||
this.dependencies.namespaceStore.selectAll();
|
||||
};
|
||||
|
||||
onChange = ([{ value: namespace }]: SelectOption[]) => {
|
||||
onChange = ([selected]: SelectOption<string>[]) => {
|
||||
if (!selected) {
|
||||
// This happens when pressing "Backspace" with an empty search field. Do nothing
|
||||
return;
|
||||
}
|
||||
|
||||
const { value: namespace } = selected;
|
||||
|
||||
if (namespace) {
|
||||
if (this.isMultiSelection) {
|
||||
this.dependencies.namespaceStore.toggleSingle(namespace);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user