-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TableListView] Fix tag selection when passing initialFilter #160871
Changes from all commits
335bdb8
9e72ed6
6305199
b1eb044
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
*/ | ||
|
||
import { FormattedRelative, I18nProvider } from '@kbn/i18n-react'; | ||
import React, { PropsWithChildren, useCallback, useState } from 'react'; | ||
import React, { PropsWithChildren, useCallback, useMemo, useState } from 'react'; | ||
|
||
import { | ||
type TableListViewKibanaDependencies, | ||
|
@@ -206,6 +206,14 @@ export const DashboardListing = ({ | |
|
||
const { getEntityName, getTableListTitle, getEntityNamePlural } = dashboardListingTableStrings; | ||
|
||
const savedObjectsTaggingFakePlugin = useMemo(() => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need a stable reference of the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. UseMemo addition makes sense. We'll be introducing a simpler services mechanic at some point, and will remove this. |
||
return savedObjectsTagging.hasApi // TODO: clean up this logic once https://github.com/elastic/kibana/issues/140433 is resolved | ||
? ({ | ||
ui: savedObjectsTagging, | ||
} as TableListViewKibanaDependencies['savedObjectsTagging']) | ||
: undefined; | ||
}, [savedObjectsTagging]); | ||
|
||
return ( | ||
<I18nProvider> | ||
<TableListViewKibanaProvider | ||
|
@@ -217,11 +225,7 @@ export const DashboardListing = ({ | |
http, | ||
}, | ||
toMountPoint, | ||
savedObjectsTagging: savedObjectsTagging.hasApi // TODO: clean up this logic once https://github.com/elastic/kibana/issues/140433 is resolved | ||
? ({ | ||
ui: savedObjectsTagging, | ||
} as TableListViewKibanaDependencies['savedObjectsTagging']) | ||
: undefined, | ||
savedObjectsTagging: savedObjectsTaggingFakePlugin, | ||
FormattedRelative, | ||
}} | ||
> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This handler has been extracted from
updateQueryFromURL()
below