-
Hi, In my application I'm trying to manipulate the header_options = {
"name": {"text": "Dessert", "align": "start", "sortable": False},
"calories": {"text": "Calories"},
"fat": {"text": "Fat (g)"},
"carbs": {"text": "Carbs (g)"},
"protein": {"text": "Protein (g)"},
"iron": {"text": "Iron (%)"},
"tasty": {"text": "Tasty"}
}
headers, rows = vuetify.dataframe_to_grid(frame, header_options)
table = {
"headers": ("table_headers", headers),
"items": ("table_rows", rows),
"v_model": ("selection", []),
"show_select": True,
"single_select": False,
"search": ("query", ""),
"classes": "elevation-1 ma-4",
"multi_sort": True,
"dense": True,
"items_per_page": 10, # -1
"height": "200",
"fixed_header": True,
"item_key": "well",
}
with vuetify.VDataTable(**table):
with vuetify.Template(tasty="{ item }", __properties=[("tasty", "v-slot:item.tasty"),],):
vuetify.VSimpleCheckbox("{{ item.tasty }}", v_model=("item.tasty",), disabled=True) Then somewhere when proceeding vtk or plotly callbacks I need to programmatically set some of the rows in the table to def on_chart_selection(selected_point_idxs):
# here I need to modify status of selected rows in datatable Is there a way to do that? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Just update |
Beta Was this translation helpful? Give feedback.
-
You may also want to read #580 |
Beta Was this translation helpful? Give feedback.
-
@jourdain thank you! It seems I just have to set the state.selection = state.table_rows[0:3] |
Beta Was this translation helpful? Give feedback.
Just update
server.state.selection = [ item.well ]