Render row selection controls server-side in SelectionTable for improved usability

This commit is contained in:
Ross
2026-03-25 21:34:38 +00:00
parent 1d19afa72d
commit bf7f88ac6e
2 changed files with 10 additions and 38 deletions
+8
View File
@@ -58,6 +58,14 @@ class SelectionTable(tables.Table):
# Defensive: don't break table rendering if introspection fails
pass
# By default render the row selection controls above the table so
# templates don't need to include `{{ table.row_selection_controls }}`.
try:
# `row_selection_controls` is already marked safe HTML.
self.caption = self.row_selection_controls
except Exception:
pass
@property
def row_selection_controls(self):
"""Return HTML for the row-selection control bar.