filter class

This commit is contained in:
2024-08-23 14:52:22 +03:00
parent 77a306a0f6
commit b4dc2f6ab1
8 changed files with 118 additions and 59 deletions

View File

@ -10,18 +10,22 @@ $table = new ListJsonTable($json);
$table->columns([
"created_at" => [
"format" => "date:Y-m-d",
'filter' => "date"
'filter' => ["input" => "date"]
],
'description' => [
"format" => "html",
"style" => ["width" => "300px"],
"filter" => "text",
"filter" => ["input" => ["radio" => "hello", "bye"]],
"value" => function ($cell) {
return "<span style='color: sienna'>$cell</span>";
}
],
'description2' => [
"filter" => ["input" => "text"],
],
'status' => [
"format" => "integer",
"filter" => ["select" => getStatusLabel()],
"value" => function ($cell) {
return getStatusLabel()[$cell];
}],