Hide selection boxes in embedded tables

This commit is contained in:
jeremystretch 2023-01-16 15:27:50 -05:00
parent 4d329a7c9b
commit 67f70c7654

View File

@ -161,7 +161,11 @@ class ObjectListView(BaseMultiObjectView, ActionsMixin, TableMixin):
# If this is an HTMX request, return only the rendered table HTML # If this is an HTMX request, return only the rendered table HTML
if is_htmx(request): if is_htmx(request):
table.embedded = is_embedded(request) if is_embedded(request):
table.embedded = True
# Hide selection checkboxes
if 'pk' in table.base_columns:
table.columns.hide('pk')
return render(request, 'htmx/table.html', { return render(request, 'htmx/table.html', {
'table': table, 'table': table,
}) })