mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Improve <NamespaceSelectFilter>'s UX (#3490)
- Display previously selected namespaces at the top of the option list when first opened - Don't resort after every selection - Automatically close the option list if no longer in multi-select mode and have toggled at least one namespace Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
91b3bd10ee
commit
51b53b3349
3 files changed
+84
-22
No files matched your search
@@ -115,8 +115,8 @@ export class Input extends React.Component<InputProps, State> {
|
||||
}
|
||||
|
||||
getValue(): string {
|
||||
const { trim, value, defaultValue = "" } = this.props;
|
||||
const rawValue = value ?? this.input?.value ?? defaultValue;
|
||||
const { trim, value, defaultValue } = this.props;
|
||||
const rawValue = value ?? this.input?.value ?? defaultValue ?? "";
|
||||
|
||||
return trim ? rawValue.trim() : rawValue;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user