diff --git a/src/plugins/presentation_util/public/components/data_view_picker/data_view_picker.tsx b/src/plugins/presentation_util/public/components/data_view_picker/data_view_picker.tsx index 8e1c7fbc74b99..267131c33058e 100644 --- a/src/plugins/presentation_util/public/components/data_view_picker/data_view_picker.tsx +++ b/src/plugins/presentation_util/public/components/data_view_picker/data_view_picker.tsx @@ -100,6 +100,9 @@ export function DataViewPicker({ compressed: true, ...(selectableProps ? selectableProps.searchProps : undefined), }} + listProps={{ + truncationProps: { truncation: 'middle' }, + }} > {(list, search) => ( <> diff --git a/src/plugins/presentation_util/public/components/field_picker/field_picker.tsx b/src/plugins/presentation_util/public/components/field_picker/field_picker.tsx index d5789284b4131..ef14a6c88dcb7 100644 --- a/src/plugins/presentation_util/public/components/field_picker/field_picker.tsx +++ b/src/plugins/presentation_util/public/components/field_picker/field_picker.tsx @@ -141,6 +141,7 @@ export const FieldPicker = ({ isVirtualized: true, showIcons: false, bordered: true, + truncationProps: { truncation: 'middle' }, }} height="full" > diff --git a/src/plugins/unified_search/public/dataview_picker/dataview_list.tsx b/src/plugins/unified_search/public/dataview_picker/dataview_list.tsx index ec231d577e11a..a42a91510abec 100644 --- a/src/plugins/unified_search/public/dataview_picker/dataview_list.tsx +++ b/src/plugins/unified_search/public/dataview_picker/dataview_list.tsx @@ -23,6 +23,7 @@ import { i18n } from '@kbn/i18n'; import { css } from '@emotion/react'; import { SortingService } from './sorting_service'; +import { MIDDLE_TRUNCATION_PROPS } from '../filter_bar/filter_editor/lib/helpers'; const strings = { sortOrder: { @@ -120,6 +121,10 @@ export function DataViewsList({ checked?: 'on' | 'off' | undefined; }> {...selectableProps} + listProps={{ + truncationProps: MIDDLE_TRUNCATION_PROPS, + ...(selectableProps?.listProps ? selectableProps.listProps : undefined), + }} data-test-subj="indexPattern-switcher" searchable singleSelection="always"