BrowseDashboards: Stop caching getAffectedItems (#89609)

stop caching getAffectedItems since alert rule/library panel creation isn't in rtkquery
This commit is contained in:
Ashley Harrison 2024-06-24 13:28:44 +01:00 committed by GitHub
parent 6a68cc87a9
commit a89deaeb73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -209,6 +209,8 @@ export const browseDashboardsAPI = createApi({
// gets the descendant counts for a folder. used in the move/delete modals.
getAffectedItems: builder.query<DescendantCount, DashboardTreeSelection>({
// don't cache this data for now, since library panel/alert rule creation isn't done through rtk query
keepUnusedDataFor: 0,
queryFn: async (selectedItems) => {
const folderUIDs = Object.keys(selectedItems.folder).filter((uid) => selectedItems.folder[uid]);