mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[Uptime] Issue/48845 Disable filter and Add link to location docs when no location exists (#49175) (#49903)
* disable search text if no item exists * update snaps
This commit is contained in:
parent
5d6cf13849
commit
bc77e711bf
2 changed files with 5 additions and 0 deletions
|
@ -25,6 +25,7 @@ exports[`FilterPopover component does not show item list when loading 1`] = `
|
|||
<EuiPopoverTitle>
|
||||
<EuiFieldSearch
|
||||
compressed={false}
|
||||
disabled={false}
|
||||
fullWidth={false}
|
||||
incremental={false}
|
||||
isLoading={false}
|
||||
|
@ -60,6 +61,7 @@ exports[`FilterPopover component renders without errors for valid props 1`] = `
|
|||
<EuiPopoverTitle>
|
||||
<EuiFieldSearch
|
||||
compressed={false}
|
||||
disabled={false}
|
||||
fullWidth={false}
|
||||
incremental={false}
|
||||
isLoading={false}
|
||||
|
|
|
@ -9,6 +9,7 @@ import React, { useState, useEffect } from 'react';
|
|||
import { i18n } from '@kbn/i18n';
|
||||
import { UptimeFilterButton } from './uptime_filter_button';
|
||||
import { toggleSelectedItems } from './toggle_selected_item';
|
||||
import { LocationLink } from '../monitor_list/location_link';
|
||||
|
||||
export interface FilterPopoverProps {
|
||||
fieldName: string;
|
||||
|
@ -73,6 +74,7 @@ export const FilterPopover = ({
|
|||
>
|
||||
<EuiPopoverTitle>
|
||||
<EuiFieldSearch
|
||||
disabled={items.length === 0}
|
||||
onSearch={query => setSearchQuery(query)}
|
||||
placeholder={
|
||||
isLoading
|
||||
|
@ -98,6 +100,7 @@ export const FilterPopover = ({
|
|||
{item}
|
||||
</EuiFilterSelectItem>
|
||||
))}
|
||||
{id === 'location' && items.length === 0 && <LocationLink />}
|
||||
</EuiPopover>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue