diff --git a/x-pack/platform/plugins/shared/ingest_pipelines/public/application/sections/pipelines_list/table.tsx b/x-pack/platform/plugins/shared/ingest_pipelines/public/application/sections/pipelines_list/table.tsx index 4372a3e4bfd33..b537ca823c010 100644 --- a/x-pack/platform/plugins/shared/ingest_pipelines/public/application/sections/pipelines_list/table.tsx +++ b/x-pack/platform/plugins/shared/ingest_pipelines/public/application/sections/pipelines_list/table.tsx @@ -6,7 +6,7 @@ */ import type { FunctionComponent } from 'react'; -import React, { useState, useMemo, useEffect } from 'react'; +import React, { useState, useMemo, useEffect, useRef } from 'react'; import qs from 'query-string'; import { i18n } from '@kbn/i18n'; import { isEmpty, omit } from 'lodash'; @@ -123,6 +123,8 @@ export const PipelineTable: FunctionComponent = ({ const { history } = useKibana().services; const [selection, setSelection] = useState([]); + const filterButtonRef = useRef(null); + const { pageSize, sorting, onTableChange } = useEuiTablePersist({ tableId: 'ingestPipelines', initialPageSize: 10, @@ -199,12 +201,17 @@ export const PipelineTable: FunctionComponent = ({ }; const closePopover = () => { setIsPopoverOpen(false); + // Return focus to the filter button when popover closes + if (filterButtonRef.current) { + filterButtonRef.current.focus?.(); + } }; const button = (