From 40165c5184e14e2b23013ea35084a3d496687a5e Mon Sep 17 00:00:00 2001 From: Dan Birman Date: Tue, 10 Dec 2024 15:48:32 -0800 Subject: [PATCH] fix: allow de-selection of subjects --- src/aind_qc_portal/projects/project_view.py | 5 ++--- src/aind_qc_portal/qc_project_app.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/aind_qc_portal/projects/project_view.py b/src/aind_qc_portal/projects/project_view.py index 187f5b2..44bf83a 100644 --- a/src/aind_qc_portal/projects/project_view.py +++ b/src/aind_qc_portal/projects/project_view.py @@ -4,8 +4,7 @@ import altair as alt from aind_qc_portal.projects.dataset import mapping, ProjectDataset -from aind_qc_portal.utils import df_timestamp_range, OUTER_STYLE -from aind_qc_portal.utils import OUTER_STYLE, AIND_COLORS +from aind_qc_portal.utils import df_timestamp_range, OUTER_STYLE, AIND_COLORS class ProjectView(): @@ -93,7 +92,7 @@ def update_subject_filter(event): self.dataset.subject_filter = event.new df_pane.object = self.get_data() - subject_filter = pn.widgets.Select(name="Subject filter", options=list(self.get_subjects())) + subject_filter = pn.widgets.Select(name="Subject filter", options=[""] + list(self.get_subjects())) subject_filter.param.watch(update_subject_filter, "value") df_col = pn.Column(subject_filter, df_pane, styles=OUTER_STYLE) diff --git a/src/aind_qc_portal/qc_project_app.py b/src/aind_qc_portal/qc_project_app.py index 18133e5..f66d758 100644 --- a/src/aind_qc_portal/qc_project_app.py +++ b/src/aind_qc_portal/qc_project_app.py @@ -6,7 +6,7 @@ """ import panel as pn import param -from aind_qc_portal.utils import OUTER_STYLE, set_background, AIND_COLORS +from aind_qc_portal.utils import set_background from aind_qc_portal.projects.project_view import ProjectView pn.extension("vega")