add value to filter

This commit is contained in:
2024-08-28 15:09:34 +03:00
parent 4a15305505
commit f20f408f12
5 changed files with 17 additions and 7 deletions

View File

@ -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];