Skip to content

Buttons

Reference

A common UI paradigm to use with interactive tables is to present buttons that will trigger some action - that may be to alter the table's state, modify the data in the table, gather the data from the table or even to activate some external process. Showing such buttons is an interface that end users are comfortable with, making them feel at home with the table.

Use built-in buttons:

.Buttons("copy", "csv", "print")
Or, configure it:
.Button(b => b.Text("Report").Action("getReport"))

Action

Action to take when the button is activated.

.Action("actionName")

Async

Indicate that a button's action processing should be performed asynchronously.

.Async(100)

Attr

Collection of attribute key / values to set for a button

.Attr("Title", "id")

Available

Ensure that any requirements have been satisfied before initialising a button.

.Available("functionName")

ClassName

Set the class name for the button.

.ClassName("copyButton")

Destroy

Function that is called when the button is destroyed.

.Destroy("functionName")

DropIcon

Show a dropdown (further action) icon.

.DropIcon(true)

Enabled

Set a button's initial enabled state.

.Enabled(false)

Extend

Define which button type the button should be based on.

.Extend("excel")

Init

Initialisation function that can be used to add events specific to this button.

.Init("functionName")

Key

Define an activation key for a button.

.Key("p")
.Key("p", altKey: true)

Name

Set a name for each selection.

.Name("copy")

Namespace

Unique namespace for every button.

.Namespace("example")

Split

Split dropdown buttons (built-in).

.Button(b => b.Split("copy", "csv", "print"))

Split dropdown buttons with configuration.

.Button(b => b.Split(x => x.Add("pdf", "report").Add("word", "report")))

Buttons

Dropdown buttons (built-in).

.Button(b => b.Buttons("copy", "csv", "print"))
Dropdown buttons with configuration.
.Button(b => b.Buttons(x => x.Add("pdf", "report").Add("word", "report")))

Tag

Set the tag for the button.

.Tag("a")

Text

The text to show in the button.

.Text("Print")

TitleAttr

Button title attribute text.

.TitleAttr("Copy")