Text Input

Creates a text input that can be used to filter or search

To see how to filter a query using a text input, see Filters.

Search

Selected:

Examples

Basic Text Input

Selected:

With Title

Search

Selected:

With Placeholder

Freetext Search

Selected:

With Default Text Prefilled

Default Selected

Selected: Sporting

Fuzzy Finding (Searching)

TextInput provides an easy-to-use shortcut for fuzzy finding. Note that this is different than LIKE, as it does not require a direct substring, and is useful in situtations where spelling may be unknown, like names.

You can reference it by using the syntax {inputs.your_input_name.search('column_name')}, and it returns a number between 0 and 1.

Usage

Assuming you had some TextInput first_name_search:

SELECT * FROM users
ORDER BY {inputs.first_name_search.search('first_name')}
LIMIT 10 -- Optionally limit to only show the 10 closest results

becomes

SELECT * FROM users
ORDER BY damerau_levenshtein(first_name, '{inputs.first_name_search}')
LIMIT 10 -- Optionally limit to only show the 10 closest results

Options

Required

Name of the text input, used to reference the selected value elsewhere as {inputs.name.value}

Options:
string

Title displayed above the text input

Options:
string

Alternative placeholder text displayed in the text input

Options:
string
Default:
Type to search

Hide the component when the report is printed

Options:
Default:
true