Skip to content

Commit

Permalink
Merge pull request #127 from hannamlmv/refresh-description
Browse files Browse the repository at this point in the history
Refresh description
  • Loading branch information
almanilsson authored Jan 15, 2025
2 parents aa7c394 + f47c593 commit 9b7d3f6
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions src/tseda/datastore.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ def __panel__():
label="Create new sample set",
)
create_sample_set_warning = pn.pane.Alert(
"If the new sample set is not shown immediately, click Refresh above",
"If options are not updated after creation of the new sample set,"
" click Refresh above",
alert_type="warning",
visible=False,
)
Expand Down Expand Up @@ -476,13 +477,22 @@ class IndividualsTable(Viewer):
description=("Reassign individuals to this sample set ID."),
)
mod_update_button = pn.widgets.Button(
name="Reassign", button_type="success", margin=(10, 10)
name="Reassign",
button_type="success",
margin=(10, 10),
description="Apply reassignment.",
)
refresh_button = pn.widgets.Button(
name="Refresh", button_type="success", margin=(10, 0)
name="Refresh",
button_type="success",
margin=(10, 0),
description="Refresh to apply updates to entire page.",
)
restore_button = pn.widgets.Button(
name="Restore", button_type="danger", margin=(10, 10)
name="Restore",
button_type="danger",
margin=(10, 10),
description="Restore sample sets to their original state.",
)
data_mod_warning = pn.pane.Alert(
"""Please enter a valid population ID and
Expand Down Expand Up @@ -679,25 +689,21 @@ def combine_tables(
combined_df["id"] = combined_df.index
combined_df = combined_df[self.columns]

formatters = self.formatters
filters = self.filters
page_size = self.page_size

combined_table = pn.widgets.Tabulator(
combined_df,
pagination="remote",
layout="fit_columns",
selectable=True,
page_size=page_size,
formatters=formatters,
page_size=self.page_size,
formatters=self.formatters,
editors=self.editors,
sorters=[
{"field": "id", "dir": "asc"},
{"field": "selected", "dir": "des"},
],
margin=10,
text_align={col: "right" for col in self.columns},
header_filters=filters,
header_filters=self.filters,
)
return combined_table

Expand Down

0 comments on commit 9b7d3f6

Please sign in to comment.