Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rowid is not included in dropdown filter menus #636

Closed
simonw opened this issue Nov 19, 2019 · 3 comments
Closed

rowid is not included in dropdown filter menus #636

simonw opened this issue Nov 19, 2019 · 3 comments

Comments

@simonw
Copy link
Owner

simonw commented Nov 19, 2019

For rowid tables the rowid column isn't shown in the list of filter options:

md__md__53_805_rows_where_where_rowid___1060124_sorted_by_rowid_descending

This also means if you link to e.g. ?rowid__gt=1060124 the resulting filter interface will be slightly broken: clicking the "apply" button again will lose your filter for example.

@simonw
Copy link
Owner Author

simonw commented Nov 19, 2019

@simonw
Copy link
Owner Author

simonw commented Nov 19, 2019

Weird, it looks like this was a deliberate decision:

filter_columns = columns[:]
if use_rowid and filter_columns[0] == "rowid":
filter_columns = filter_columns[1:]

From this commit - 52a5e95 - which closed #162

@simonw
Copy link
Owner Author

simonw commented Nov 19, 2019

So I need to make sure the Link column isn't displayed in the filters, as seen in this screenshot from #162:

food-trucks__applicant__131_rows

I'll add a test for that against this table: https://v0-32.datasette.io/fixtures/compound_primary_key

@simonw simonw closed this as completed in 440a704 Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant