datasette icon indicating copy to clipboard operation
datasette copied to clipboard

Option to un-filter facet not shown for `?col__exact=value`

Open simonw opened this issue 3 years ago • 2 comments

Spotted this on a page with COUNTY__exact=Lee in the URL:

CleanShot 2022-03-29 at 21 41 46@2x

With COUNTY=Lee you get this instead:

image

simonw avatar Mar 30 '22 04:03 simonw

Relevant template: https://github.com/simonw/datasette/blob/e73fa72917ca28c152208d62d07a490c81cadf52/datasette/templates/table.html#L168-L172

Populated from here: https://github.com/simonw/datasette/blob/c496f2b663ff0cef908ffaaa68b8cb63111fb5f2/datasette/facets.py#L246-L253

simonw avatar Mar 30 '22 04:03 simonw

selected = (column_qs, str(row["value"])) in qs_pairs is wrong.

simonw avatar Mar 30 '22 04:03 simonw