Skip to content

Commit 1c317ae

Browse files
authored
Merge pull request #2318 from redpanda-data/fix/refresh-data-topics
Refresh data in topics
2 parents 5afa058 + 4a0a82c commit 1c317ae

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

frontend/src/components/pages/topics/topic-list.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import { useLegacyListTopicsQuery } from 'react-query/api/topic';
4141
import { CreateTopicModal } from './CreateTopicModal/create-topic-modal';
4242
import colors from '../../../colors';
4343
import usePaginationParams from '../../../hooks/use-pagination-params';
44+
import { appGlobal } from '../../../state/app-global';
4445
import { api } from '../../../state/backend-api';
4546
import { type Topic, TopicActions } from '../../../state/rest-interfaces';
4647
import { uiSettings } from '../../../state/ui';
@@ -87,6 +88,10 @@ const TopicList: FC = () => {
8788
refetchTopics();
8889
}, [refetchTopics]);
8990

91+
useEffect(() => {
92+
appGlobal.onRefresh = refreshData;
93+
}, [refreshData]);
94+
9095
const topics = useMemo(() => {
9196
let filteredTopics = data.topics ?? [];
9297
if (!showInternalTopics) {

0 commit comments

Comments
 (0)