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

Facet by JSON array configuration #2305

Open
JBPressac opened this issue Mar 13, 2024 · 0 comments
Open

Facet by JSON array configuration #2305

JBPressac opened this issue Mar 13, 2024 · 0 comments

Comments

@JBPressac
Copy link
Contributor

Hello,

On the URL given as example for Facet by JSON in the documentation, if the facet on tags is deactivated (by clicking on the x):

2024-03-13 16_41_32-Window

and you try to reactivate the facet with 'facet by this' on the tags columns menu:

2024-03-13 16_45_10-Window

the facets are now based on the entire JSON arrays:

2024-03-13 16_46_58-Window

On a local installation of Datasette (version 0.63.2), using another database, I configured metadata.json to specify array facets, following the documentation example:

{
  "facets": [
    {"array": "data_string"},
  ]
}

However, if the facets are properly interpreted as JSON arrays, they could not be removed (as specified in the doc).

2024-03-13 16_56_28-Window

Is there a way to activate facet by JSON array on a column without making it permanent? And still available by selecting the "facet by this" command in the menu of the column?

In other way, how "facet by this" could redirect the page to https://latest.datasette.io/fixtures/facetable?_facet_array=tags rather than https://latest.datasette.io/fixtures/facetable?_facet_tags=&_facet=tags in the doc's example?

Thank you,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant