Tempo: If no search tag then do not query API for tag values (#72522)

* If no tag then do not query api for tag values

* Update test
This commit is contained in:
Joey 2023-08-01 08:44:13 +01:00 committed by GitHub
parent ed9dc63326
commit 7612f3d955
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -128,7 +128,7 @@ describe('SearchField', () => {
};
const { container } = renderSearchField(updateFilter, filter, ['tag1', 'tag22', 'tag33']);
const select = await container.querySelector(`input[aria-label="select test1 tag"]`);
const select = container.querySelector(`input[aria-label="select test1 tag"]`);
expect(select).not.toBeNull();
expect(select).toBeInTheDocument();
if (select) {

View File

@ -60,7 +60,7 @@ const SearchField = ({
const updateOptions = async () => {
try {
return await languageProvider.getOptionsV2(scopedTag);
return filter.tag ? await languageProvider.getOptionsV2(scopedTag) : [];
} catch (error) {
// Display message if Tempo is connected but search 404's
if (isFetchError(error) && error?.status === 404) {