Spaces:
Running
Running
Commit ·
62fd708
1
Parent(s): c8d7c0b
Make the sample table more interactively
Browse files
src/ai_dashboard/table_plugin/table_sample.py
CHANGED
|
@@ -24,10 +24,25 @@ class SampleTablePlugin(BaseTablePlugin):
|
|
| 24 |
|
| 25 |
return dash_table.DataTable( # type: ignore
|
| 26 |
id="sample-table",
|
| 27 |
-
columns=[
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
style_cell={
|
| 32 |
"textAlign": "center",
|
| 33 |
"padding": "6px",
|
|
|
|
| 24 |
|
| 25 |
return dash_table.DataTable( # type: ignore
|
| 26 |
id="sample-table",
|
| 27 |
+
columns=[
|
| 28 |
+
{
|
| 29 |
+
"name": col,
|
| 30 |
+
"id": col,
|
| 31 |
+
"hideable": True,
|
| 32 |
+
"deletable": False,
|
| 33 |
+
"renamable": False,
|
| 34 |
+
}
|
| 35 |
+
for col in self.dataframe.columns
|
| 36 |
+
],
|
| 37 |
+
data=self.dataframe.to_dict("records"),
|
| 38 |
+
page_size=len(self.dataframe),
|
| 39 |
+
page_action="native",
|
| 40 |
+
filter_action="native",
|
| 41 |
+
row_selectable=None,
|
| 42 |
+
column_selectable="multi",
|
| 43 |
+
editable=False,
|
| 44 |
+
fixed_rows={"headers": True},
|
| 45 |
+
style_table={"overflowY": "auto", "overflowX": "auto", "height": "500px"},
|
| 46 |
style_cell={
|
| 47 |
"textAlign": "center",
|
| 48 |
"padding": "6px",
|