> For the complete documentation index, see [llms.txt](https://docs.jetadmin.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.jetadmin.io/classic-app-builder/design-and-structure/components-visibility/conditional-visibility/examples/hiding-a-component-until-a-row-is-selected.md).

# Hiding a component until a row is selected

If, for example, you need to hide a component until a row is selected in a table, you need to do the following:

1. Select the component that you want to add conditional visibility to. In this example, that component is a table that displays all the purchases made by the selected customer.
2. In the component menu, go to the *Display* section.
3. Click in the *Conditional Visibility* field, and choose the condition that you want to use, or use a formula. In this example, I'm choosing my *Customers* table and then *Selected Row*. This way, when my user clicks on a customer, a table will appear below the first one that shows all the purchases made by that customer. Note that I click on the *Apply* button next to *Selected Row* – this is because I don't want a specific value from that row.&#x20;

You do not have to enter it manually, but the value of the Conditional Visibility field in this case will be&#x20;

`=elements.Customers["0"].selected_item`

{% hint style="info" %}
The table will now be hidden as long as no row is selected in the table.
{% endhint %}

App Builder view:

<figure><img src="https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2FauBWYJqI8gL8OTPwJUey%2FUntitled7.gif?alt=media&amp;token=4ef52097-2593-4fb9-95dd-8471b77e48cc" alt=""><figcaption></figcaption></figure>

App view:

<figure><img src="https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2FTubg5a7qtG6nAllKuZJE%2FUntitled8.gif?alt=media&amp;token=d6d47827-b622-4299-bfce-c5411193a12c" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.jetadmin.io/classic-app-builder/design-and-structure/components-visibility/conditional-visibility/examples/hiding-a-component-until-a-row-is-selected.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
