File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
packages/manager/apps/dedicated-servers/src/pages/listing/server Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -16,18 +16,19 @@ import { urls } from '@/routes/routes.constant';
16
16
import { ErrorComponent } from '@/components/errorComponent' ;
17
17
18
18
export default function ServerListing ( ) {
19
- const columns = useColumns ( ) ;
20
- const [ visibleColumns ] = useState ( [
21
- 'name' ,
19
+ const [ columnVisibility , setColumnVisibility ] = useState ( [
20
+ 'iam.displayName' ,
22
21
'ip' ,
23
- 'model ' ,
22
+ 'commercialRange ' ,
24
23
'region' ,
25
- 'status' ,
26
- 'actions' ,
24
+ 'state' ,
27
25
'tags' ,
26
+ 'actions' ,
28
27
] ) ;
28
+ const columns = useColumns ( ) ;
29
+
29
30
const { sorting, setSorting } = useDataGrid ( {
30
- id : 'displayName ' ,
31
+ id : 'iam_displayName ' ,
31
32
desc : false ,
32
33
} ) ;
33
34
const {
@@ -58,7 +59,7 @@ export default function ServerListing() {
58
59
return ( s1 . iam ?. displayName ) . localeCompare ( s2 . iam ?. displayName ) ;
59
60
}
60
61
if ( key && Object . keys ( s1 ) . includes ( key as string ) ) {
61
- return ( s1 [ key ] . toString ( ) || '' ) . localeCompare ( s2 [ key ] . toString ( ) ) ;
62
+ return ( s1 [ key ] ? .toString ( ) || '' ) . localeCompare ( s2 [ key ] ? .toString ( ) ) ;
62
63
}
63
64
return 0 ;
64
65
} ) ;
@@ -93,7 +94,8 @@ export default function ServerListing() {
93
94
onSortChange = { setSorting }
94
95
isLoading = { isLoading }
95
96
filters = { filters }
96
- columnVisibility = { visibleColumns }
97
+ columnVisibility = { columnVisibility }
98
+ setColumnVisibility = { setColumnVisibility }
97
99
search = { search }
98
100
className = "server-data-grid"
99
101
topbar = { < OrderMenu /> }
You can’t perform that action at this time.
0 commit comments