# Searchable list

The CarbonListComponent supports both backend and frontend search. For the frontend search to work, the table must not be paginated. In order to enable search the following steps must be followed:

1. Set the input in the template:

   **`sample.component.html`**

   ```angular2html
   <valtimo-carbon-list
       [items]="items"
       [fields]="fields"
       [isSearchable]="true"
   ></valtimo-carbon-list>
   ```
2. (For BE search) Add a listener for the search:

   **`sample.component.html`**

   ```angular2html
   <valtimo-carbon-list
     [items]="items"
     [fields]="fields"
     [isSearchable]="true"
     (search)="onSearch($event)"
   ></valtimo-carbon-list>
   ```
3. (For BE search) Define your search handler:

   **`sample.component.ts`**

   ```typescript
   ...
   public onSearch(searchString: string) {
       // Code to process search
   }
   ...
   ```

This will create a list with search enabled:

![list-with-search.png](/files/VnuIMqIM4ppzYIRD2Gzr)


---

# 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.valtimo.nl/v12/nog-een-plek-geven/reference/user-interface/searchable-list.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.
