Skip to content
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

Show loading indicator when searching in Topics & Consumers screens #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 23 additions & 18 deletions kafka-ui-react-app/src/components/ConsumerGroups/List.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import PageHeading from 'components/common/PageHeading/PageHeading';
import PageLoader from 'components/common/PageLoader/PageLoader';
import Search from 'components/common/Search/Search';
import { ControlPanelWrapper } from 'components/common/ControlPanel/ControlPanel.styled';
import {
Expand Down Expand Up @@ -96,24 +97,28 @@ const List = () => {
<ControlPanelWrapper hasInput>
<Search placeholder="Search by Consumer Group ID" />
</ControlPanelWrapper>
<Table
columns={columns}
pageCount={consumerGroups.data?.pageCount || 0}
data={consumerGroups.data?.consumerGroups || []}
emptyMessage={
consumerGroups.isSuccess
? 'No active consumer groups found'
: 'Loading...'
}
serverSideProcessing
enableSorting
onRowClick={({ original }) =>
navigate(
clusterConsumerGroupDetailsPath(clusterName, original.groupId)
)
}
disabled={consumerGroups.isFetching}
/>
{consumerGroups.isSuccess ? (
<Table
columns={columns}
pageCount={consumerGroups.data?.pageCount || 0}
data={consumerGroups.data?.consumerGroups || []}
emptyMessage={
consumerGroups.isSuccess
? 'No active consumer groups found'
: 'Loading...'
}
serverSideProcessing
enableSorting
onRowClick={({ original }) =>
navigate(
clusterConsumerGroupDetailsPath(clusterName, original.groupId)
)
}
disabled={consumerGroups.isFetching}
/>
) : (
<PageLoader />
)}
</>
);
};
Expand Down
Loading