Skip to content

Text Filter

A text filter will insert a text input field into your table that allows users to type characters to filter records.

Getting Started

You can create a text filter as so

go
TextFilter("Name")

Type

You can set the type for your text filter using as so:

go
TextFilter("name").
    Text(). // Default - Not required.
    Email().
    URL().
    Password().
    Number().
    Telephone()

Mode

You can set the mode of your text filter as follows:

go
TextFilter("name").
    ModeText(). // Default - Not required.
    ModeDecimal().
    ModeEmail().
    ModeNone().
    ModeNumeric().
    ModeSearch().
    ModeTelephone().
    ModeURL()

Description

You can set the Description of your text filter as follows:

go
TextFilter("name"). 
    Description("Enter the name of a manager here!")

NumericStep

When your input is a Number type, you can customize the numeric step as so:

go
TextFilter("name").
    NumericStep(15)

Autocomplete

You can enable autocomplete for your input as so:

go
TextFilter("Name").
    Autocomplete()

Prefix Icon

You can specify the prefix icon for your text input as so:

go
TextFilter("name").
    PrefixIcon(icons.Anvil)

Postfix Icon

You can specify the postfix icon for your text input as so:

go
TextFilter("name").
    PostfixIcon(icons.Anvil)

Released under the MIT License.