?_col=/?_nocol= to show/hide columns on the table page

Closes #615

* Cog icon for hiding columns
* Show all columns cog menu item
* Do not allow hide column on primary keys
* Allow both ?_col= and ?_nocol=
* De-duplicate if ?_col= passed multiple times
* 400 error if user tries to ?_nocol= a primary key
* Documentation for ?_col= and ?_nocol=
This commit is contained in:
Simon Willison 2021-05-26 21:17:43 -07:00 committed by GitHub
commit f1c29fd6a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 142 additions and 15 deletions

View file

@ -296,6 +296,12 @@ You can filter the data returned by the table based on column values using a que
Special table arguments
~~~~~~~~~~~~~~~~~~~~~~~
``?_col=COLUMN1&_col=COLUMN2``
List specific columns to display. These will be shown along with any primary keys.
``?_nocol=COLUMN1&_nocol=COLUMN2``
List specific columns to hide - any column not listed will be displayed. Primary keys cannot be hidden.
``?_labels=on/off``
Expand foreign key references for every possible column. See below.