Wizard: "No results" option should be disabled
This moves the "No results" option outside of options and renders it as a disabled option when `selectOptions.lenght === 0`.
This commit is contained in:
parent
f3776bbf1a
commit
e9b73c55a4
1 changed files with 8 additions and 3 deletions
|
|
@ -86,9 +86,6 @@ const ActivationKeysList = () => {
|
|||
.filter((keyName: string) =>
|
||||
String(keyName).toLowerCase().includes(filterValue.toLowerCase())
|
||||
);
|
||||
if (filteredKeys && !filteredKeys.length) {
|
||||
filteredKeys = [`No results found for "${filterValue}"`];
|
||||
}
|
||||
if (!isOpen) {
|
||||
setIsOpen(true);
|
||||
}
|
||||
|
|
@ -204,6 +201,14 @@ const ActivationKeysList = () => {
|
|||
);
|
||||
}
|
||||
|
||||
if (isSuccessActivationKeys && selectOptions.length === 0) {
|
||||
selectOptionsElement.push(
|
||||
<SelectOption key="no_results" value="no_results" isDisabled>
|
||||
No results found
|
||||
</SelectOption>
|
||||
);
|
||||
}
|
||||
|
||||
return selectOptionsElement;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue