NAME
Term::Fabulous::Event::ColumnsChange - The user chose which columns of a table are shown
SYNOPSIS
$table->on( ColumnsChange => sub ($event) {
save_setting( columns => join ',', @{ $event->visible } );
return;
} );
DESCRIPTION
Term::Fabulous::Widget::Table fires ColumnsChange on itself each time the user shows or hides a column in its column chooser (see "open_column_chooser" in Term::Fabulous::Widget::Table). The methods show_columns and its relatives fire nothing. The column chooser is explained in the column chooser section of the tables guide.
It is a Clay::UI::Events::Event whose name is ColumnsChange; listen for it with $table->on( ColumnsChange => sub ($event) { ... } ). It bubbles to the table's ancestors like every event (see "Return values and bubbling" in Term::Fabulous::Manual::Events), and $event->target is the table.
CONSTRUCTOR
new
my $event = Term::Fabulous::Event::ColumnsChange->new( visible => ... );
The table builds these events itself; build one yourself only to test your listeners. visible is required and must be an array reference; it is copied. Unknown parameters die.
visible-
See "visible".
METHODS
visible
The keys of the visible columns, in their order (a new array reference).
SEE ALSO
Term::Fabulous::Widget::Table, "EVENTS" in Term::Fabulous::Manual::Events, "Choosing the visible columns" in Term::Fabulous::Manual::Tables, "Let the user choose the visible columns (column chooser)" in Term::Fabulous::Cookbook::Tables.