Fix ugly Combobox loading state (#38778)
This commit is contained in:
1 parent
1cae543e8f
commit
e3c0883d32
3 files changed
+41
-4
No files matched your search
@@ -331,6 +331,10 @@ const TopicField: React.FC = () => {
|
||||
[topic],
|
||||
);
|
||||
|
||||
const isCurrentTopicOnlySuggestion =
|
||||
tags.length === 1 && tags[0]?.id === 'new';
|
||||
const hideTagSuggestions = !tags.length || isCurrentTopicOnlySuggestion;
|
||||
|
||||
return (
|
||||
<ComboboxField
|
||||
required={false}
|
||||
@@ -369,7 +373,7 @@ const TopicField: React.FC = () => {
|
||||
}
|
||||
: undefined
|
||||
}
|
||||
suppressMenu={!tags.length}
|
||||
suppressMenu={hideTagSuggestions}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user