# 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="/files/m1IS6AzUIfUsZMbvxgZo" alt=""><figcaption></figcaption></figure>

App view:

<figure><img src="/files/zVsYUz5EgXvtp1HuIEA5" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.jetadmin.io/user-guide/components-visibility/conditional-visibility/examples/hiding-a-component-until-a-row-is-selected.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
