File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,6 +46,14 @@ const TeamTable: React.FC<TeamTableProps> = ({
4646 useRemoveUserFromTeamMutation
4747} ) => {
4848 const theme = useTheme ( ) ;
49+ columns . forEach ( ( col ) => {
50+ if ( ! col . options ) {
51+ col . options = { } ;
52+ }
53+ col . options . sort = true ;
54+ col . options . filter = true ;
55+ col . options . display = columnVisibility [ col . name ] ?? true ;
56+ } ) ;
4957 return (
5058 < ErrorBoundary >
5159 < ResponsiveDataTable
Original file line number Diff line number Diff line change @@ -122,8 +122,8 @@ export default function TeamTableConfiguration({
122122 name : 'id' ,
123123 label : 'ID' ,
124124 options : {
125- filter : false ,
126- sort : false ,
125+ filter : true ,
126+ sort : true ,
127127 searchable : false ,
128128 customBodyRender : ( value : string ) => < FormatId id = { value } />
129129 }
@@ -132,7 +132,7 @@ export default function TeamTableConfiguration({
132132 name : 'name' ,
133133 label : 'Name' ,
134134 options : {
135- filter : false ,
135+ filter : true ,
136136 sort : true ,
137137 searchable : true
138138 }
@@ -141,7 +141,7 @@ export default function TeamTableConfiguration({
141141 name : 'description' ,
142142 label : 'Description' ,
143143 options : {
144- filter : false ,
144+ filter : true ,
145145 sort : true ,
146146 searchable : false ,
147147 customBodyRender : ( value : string ) => < ConditionalTooltip value = { value } maxLength = { 30 } />
@@ -151,7 +151,7 @@ export default function TeamTableConfiguration({
151151 name : 'owner' ,
152152 label : 'Owner' ,
153153 options : {
154- filter : false ,
154+ filter : true ,
155155 sort : true ,
156156 searchable : true
157157 }
@@ -160,7 +160,7 @@ export default function TeamTableConfiguration({
160160 name : 'created_at' ,
161161 label : 'Created At' ,
162162 options : {
163- filter : false ,
163+ filter : true ,
164164 sort : true ,
165165 searchable : false ,
166166 sortDescFirst : true
@@ -170,7 +170,7 @@ export default function TeamTableConfiguration({
170170 name : 'updated_at' ,
171171 label : 'Updated At' ,
172172 options : {
173- filter : false ,
173+ filter : true ,
174174 sort : true ,
175175 searchable : false ,
176176 sortDescFirst : true
@@ -404,7 +404,11 @@ export default function TeamTableConfiguration({
404404
405405 return {
406406 columns,
407- tableOptions : options ,
407+ tableOptions : {
408+ ...options ,
409+ filter : true ,
410+ sort : true
411+ } ,
408412 tableCols,
409413 updateCols,
410414 columnVisibility,
You can’t perform that action at this time.
0 commit comments