File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import { CONSUMER_GROUP_STATE_TOOLTIPS, PER_PAGE } from 'lib/constants';
1616import { useConsumerGroups } from 'lib/hooks/api/consumers' ;
1717import Tooltip from 'components/common/Tooltip/Tooltip' ;
1818import ResourcePageHeading from 'components/common/ResourcePageHeading/ResourcePageHeading' ;
19+ import { useLocalStoragePersister } from 'components/common/NewTable/ColumnResizer/lib' ;
1920
2021const List = ( ) => {
2122 const { clusterName } = useAppParams < ClusterNameRoute > ( ) ;
@@ -47,6 +48,7 @@ const List = () => {
4748 to = { encodeURIComponent ( `${ getValue < string | number > ( ) } ` ) }
4849 />
4950 ) ,
51+ size : 600 ,
5052 } ,
5153 {
5254 id : ConsumerGroupOrdering . MEMBERS ,
@@ -96,6 +98,8 @@ const List = () => {
9698 [ ]
9799 ) ;
98100
101+ const columnSizingPersister = useLocalStoragePersister ( 'Consumers' ) ;
102+
99103 return (
100104 < >
101105 < ResourcePageHeading text = "Consumers" />
@@ -118,6 +122,8 @@ const List = () => {
118122 clusterConsumerGroupDetailsPath ( clusterName , original . groupId )
119123 )
120124 }
125+ enableColumnResizing
126+ columnSizingPersister = { columnSizingPersister }
121127 disabled = { consumerGroups . isFetching }
122128 />
123129 </ >
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { useSearchParams } from 'react-router-dom';
88import ClusterContext from 'components/contexts/ClusterContext' ;
99import { useTopics } from 'lib/hooks/api/topics' ;
1010import { PER_PAGE } from 'lib/constants' ;
11+ import { useLocalStoragePersister } from 'components/common/NewTable/ColumnResizer/lib' ;
1112
1213import { TopicTitleCell } from './TopicTitleCell' ;
1314import ActionsCell from './ActionsCell' ;
@@ -39,6 +40,7 @@ const TopicTable: React.FC = () => {
3940 header : 'Topic Name' ,
4041 accessorKey : 'name' ,
4142 cell : TopicTitleCell ,
43+ size : 400 ,
4244 meta : {
4345 width : '100%' ,
4446 } ,
@@ -70,6 +72,7 @@ const TopicTable: React.FC = () => {
7072 accessorKey : 'replicationFactor' ,
7173 enableSorting : false ,
7274 size : 148 ,
75+ maxSize : 148 ,
7376 } ,
7477 {
7578 id : TopicColumnsToSort . MESSAGES_COUNT ,
@@ -97,6 +100,8 @@ const TopicTable: React.FC = () => {
97100 [ ]
98101 ) ;
99102
103+ const columnSizingPersister = useLocalStoragePersister ( 'Topics' ) ;
104+
100105 return (
101106 < Table
102107 data = { topics }
@@ -108,6 +113,8 @@ const TopicTable: React.FC = () => {
108113 enableRowSelection = {
109114 ! isReadOnly ? ( row ) => ! row . original . internal : undefined
110115 }
116+ enableColumnResizing
117+ columnSizingPersister = { columnSizingPersister }
111118 emptyMessage = "No topics found"
112119 />
113120 ) ;
You can’t perform that action at this time.
0 commit comments