add value to filter
This commit is contained in:
@ -22,7 +22,8 @@ $table->columns([
|
||||
"style" => ["width" => "300px"],
|
||||
"filter" => [
|
||||
'class' => InputFilter::class,
|
||||
'param' => 'text'
|
||||
'param' => 'text',
|
||||
'value' => 'value'
|
||||
],
|
||||
"value" => function ($cell) {
|
||||
return "<span style='color: sienna'>$cell</span>";
|
||||
@ -32,14 +33,16 @@ $table->columns([
|
||||
"format" => "html",
|
||||
"filter" => [
|
||||
'class' => SelectFilter::class,
|
||||
'param' => ['black', 'red', 'green', 'blue', 'yellow']
|
||||
'param' => ['black', 'red', 'green', 'blue', 'yellow'],
|
||||
'value' => 'red'
|
||||
],
|
||||
],
|
||||
'status' => [
|
||||
"format" => "integer",
|
||||
"filter" => [
|
||||
'class' => SelectFilter::class,
|
||||
'param' => getStatusLabel()
|
||||
'param' => getStatusLabel(),
|
||||
'value' => 'Активный'
|
||||
],
|
||||
"value" => function ($cell) {
|
||||
return getStatusLabel()[$cell];
|
||||
|
Reference in New Issue
Block a user