mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Maps] Use id-values from client-manifest to suggest layers (#102788)
This commit is contained in:
parent
81fe54109e
commit
3c780a8505
5 changed files with 122 additions and 225 deletions
|
@ -14,13 +14,6 @@ import { DocumentStatsTable } from './document_stats';
|
|||
import { ExpandedRowContent } from './expanded_row_content';
|
||||
import { ChoroplethMap } from './choropleth_map';
|
||||
|
||||
const COMMON_EMS_LAYER_IDS = [
|
||||
'world_countries',
|
||||
'administrative_regions_lvl2',
|
||||
'usa_zip_codes',
|
||||
'usa_states',
|
||||
];
|
||||
|
||||
export const KeywordContent: FC<FieldDataRowProps> = ({ config }) => {
|
||||
const [EMSSuggestion, setEMSSuggestion] = useState<EMSTermJoinConfig | null | undefined>();
|
||||
const { stats, fieldName } = config;
|
||||
|
@ -32,7 +25,6 @@ export const KeywordContent: FC<FieldDataRowProps> = ({ config }) => {
|
|||
const loadEMSTermSuggestions = useCallback(async () => {
|
||||
if (!mapsPlugin) return;
|
||||
const suggestion: EMSTermJoinConfig | null = await mapsPlugin.suggestEMSTermJoinConfig({
|
||||
emsLayerIds: COMMON_EMS_LAYER_IDS,
|
||||
sampleValues: Array.isArray(stats?.topValues)
|
||||
? stats?.topValues.map((value) => value.key)
|
||||
: [],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue