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

AdHocFilters: add hidden option #1012

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

mikkancso
Copy link

We'd like to add a search input field to a page which already has AdHocFilters with a restricted set of keywords. We have the following requirements:

  • when a search term is supplied, then all the queries on the page should be filtered as if there was a filter added for the a specific, fixed label. More precisely it should be equivalent to adding specific_label=~.*searchTerm.*
  • but we don't want this new filter to be shown by the AdHocFilter control (we currently use VariableValueControl for that) or the URL

This PR enables us to achieve this by introducing the hidden property on AdHocFilters.

Related discussion: https://raintank-corp.slack.com/archives/C04FRQ2S0AV/p1732712478401569

Copy link
Member

@dprokop dprokop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add tests for that and should be ok to go!

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

Successfully merging this pull request may close these issues.

2 participants