diff --git a/apps/meteor/client/views/omnichannel/currentChats/CurrentChatsRoute.tsx b/apps/meteor/client/views/omnichannel/currentChats/CurrentChatsRoute.tsx index 53f44a1fafc8..f2230bdd6776 100644 --- a/apps/meteor/client/views/omnichannel/currentChats/CurrentChatsRoute.tsx +++ b/apps/meteor/client/views/omnichannel/currentChats/CurrentChatsRoute.tsx @@ -126,7 +126,10 @@ const CurrentChatsRoute = (): ReactElement => { const t = useTranslation(); const id = useRouteParameter('id'); - const query = currentChatQuery(params, customFields, [sortBy, sortDirection]); + const query = useMemo( + () => currentChatQuery(params, customFields, [sortBy, sortDirection]), + [customFields, params, sortBy, sortDirection], + ); const canViewCurrentChats = usePermission('view-livechat-current-chats'); const canRemoveClosedChats = usePermission('remove-closed-livechat-room'); const directoryRoute = useRoute('omnichannel-current-chats');