Skip to content

Commit 360f68f

Browse files
committed
fix(#10): make the group button deselect group
1 parent ef57571 commit 360f68f

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/e3sm_quickview/components/drawers.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,25 @@ def __init__(self, load_variables=None):
7373

7474
with self:
7575
with html.Div(style="position:fixed;top:0;width: 500px;"):
76+
with v3.VCardActions(classes="pb-0", style="min-height: 0;"):
77+
v3.VBtn(
78+
classes="text-none",
79+
color="primary",
80+
prepend_icon="mdi-database",
81+
text=(
82+
"`Load ${variables_selected.length} variable${variables_selected.length > 1 ? 's' :''}`",
83+
),
84+
variant="flat",
85+
disabled=(
86+
"variables_selected.length === 0 || variables_loaded",
87+
),
88+
click=load_variables,
89+
block=True,
90+
)
7691
with v3.VCardActions(
7792
key="variables_selected.length",
78-
classes="flex-wrap",
79-
style="overflow-y: auto; max-height: 100px;",
93+
classes="flex-wrap py-1",
94+
style="overflow-y: auto; max-height: 100px; min-height: 42px;",
8095
):
8196
v3.VChip(
8297
"{{ variables_selected.filter(id => variables_listing.find(v => v.id === id)?.type === vtype.name).length }} {{ vtype.name }}",
@@ -89,26 +104,11 @@ def __init__(self, load_variables=None):
89104
size="small",
90105
closable=True,
91106
click_close=(
92-
"variables_selected = variables_selected.filter(id => variables_listing.find(v => v.id === id)?.type !== vtype.name)",
107+
"variables_selected = variables_selected.filter(id => variables_listing.find(v => v.id === id)?.type !== vtype.name)"
93108
),
94109
classes="ma-1",
95110
)
96111

97-
v3.VSpacer()
98-
v3.VBtn(
99-
classes="text-none",
100-
color="primary",
101-
prepend_icon="mdi-database",
102-
text=(
103-
"`Load ${variables_selected.length} variable${variables_selected.length > 1 ? 's' :''}`",
104-
),
105-
variant="flat",
106-
disabled=(
107-
"variables_selected.length === 0 || variables_loaded",
108-
),
109-
click=load_variables,
110-
)
111-
112112
v3.VTextField(
113113
v_model=("variables_filter", ""),
114114
hide_details=True,

0 commit comments

Comments
 (0)