Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 6 additions & 0 deletions frontend/src/components/ConsumerGroups/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { CONSUMER_GROUP_STATE_TOOLTIPS, PER_PAGE } from 'lib/constants';
import { useConsumerGroups } from 'lib/hooks/api/consumers';
import Tooltip from 'components/common/Tooltip/Tooltip';
import ResourcePageHeading from 'components/common/ResourcePageHeading/ResourcePageHeading';
import { useLocalStoragePersister } from 'components/common/NewTable/ColumnResizer/lib';

const List = () => {
const { clusterName } = useAppParams<ClusterNameRoute>();
Expand Down Expand Up @@ -47,6 +48,7 @@ const List = () => {
to={encodeURIComponent(`${getValue<string | number>()}`)}
/>
),
size: 600,
},
{
id: ConsumerGroupOrdering.MEMBERS,
Expand Down Expand Up @@ -96,6 +98,8 @@ const List = () => {
[]
);

const columnSizingPersister = useLocalStoragePersister('Consumers');

return (
<>
<ResourcePageHeading text="Consumers" />
Expand All @@ -118,6 +122,8 @@ const List = () => {
clusterConsumerGroupDetailsPath(clusterName, original.groupId)
)
}
enableColumnResizing
columnSizingPersister={columnSizingPersister}
disabled={consumerGroups.isFetching}
/>
</>
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/components/Topics/List/TopicTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { useSearchParams } from 'react-router-dom';
import ClusterContext from 'components/contexts/ClusterContext';
import { useTopics } from 'lib/hooks/api/topics';
import { PER_PAGE } from 'lib/constants';
import { useLocalStoragePersister } from 'components/common/NewTable/ColumnResizer/lib';

import { TopicTitleCell } from './TopicTitleCell';
import ActionsCell from './ActionsCell';
Expand Down Expand Up @@ -39,6 +40,7 @@ const TopicTable: React.FC = () => {
header: 'Topic Name',
accessorKey: 'name',
cell: TopicTitleCell,
size: 400,
meta: {
width: '100%',
},
Expand Down Expand Up @@ -70,6 +72,7 @@ const TopicTable: React.FC = () => {
accessorKey: 'replicationFactor',
enableSorting: false,
size: 148,
maxSize: 148,
},
{
header: 'Number of messages',
Expand Down Expand Up @@ -103,6 +106,8 @@ const TopicTable: React.FC = () => {
[]
);

const columnSizingPersister = useLocalStoragePersister('Topics');

return (
<Table
data={topics}
Expand All @@ -114,6 +119,8 @@ const TopicTable: React.FC = () => {
enableRowSelection={
!isReadOnly ? (row) => !row.original.internal : undefined
}
enableColumnResizing
columnSizingPersister={columnSizingPersister}
emptyMessage="No topics found"
/>
);
Expand Down
Loading