Spaces:
Running
Running
Split the closed dataset headers into 2 lines
Browse files
app/backend/multi_header_util.py
CHANGED
@@ -40,7 +40,7 @@ def format_closed_dataset_header(column_name):
|
|
40 |
description_part = "(" + parts[1] # "(description)"
|
41 |
return f"{dataset_part}\n{description_part}"
|
42 |
|
43 |
-
# Return original if it doesn't match the pattern
|
44 |
return column_name.replace('_', '')
|
45 |
|
46 |
|
@@ -82,19 +82,11 @@ def mutil_header_options(column_list: list, avg_column: str, is_section: bool):
|
|
82 |
'children': [
|
83 |
{'headerName': format_closed_dataset_header(column),
|
84 |
'field': column,
|
85 |
-
|
86 |
-
"headerComponentParams": {
|
87 |
-
"innerHeaderComponent": "linkHeaderComponent",
|
88 |
-
"url": LINK + get_dataset_url_name(column),
|
89 |
-
"headerName": column
|
90 |
-
},
|
91 |
-
|
92 |
'headerClass': 'custom-header-style',
|
93 |
'cellClass': 'custom-cell-style',
|
94 |
'sortable': True,
|
95 |
# 'width': 150,
|
96 |
"suppressColumnVirtualisation": True,
|
97 |
-
|
98 |
} for column in close_group_list
|
99 |
],
|
100 |
|
|
|
40 |
description_part = "(" + parts[1] # "(description)"
|
41 |
return f"{dataset_part}\n{description_part}"
|
42 |
|
43 |
+
# Return original if it doesn't match the pattern, removing underscores
|
44 |
return column_name.replace('_', '')
|
45 |
|
46 |
|
|
|
82 |
'children': [
|
83 |
{'headerName': format_closed_dataset_header(column),
|
84 |
'field': column,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
'headerClass': 'custom-header-style',
|
86 |
'cellClass': 'custom-cell-style',
|
87 |
'sortable': True,
|
88 |
# 'width': 150,
|
89 |
"suppressColumnVirtualisation": True,
|
|
|
90 |
} for column in close_group_list
|
91 |
],
|
92 |
|