filter class
This commit is contained in:
@ -14,14 +14,12 @@
|
||||
"perPage": "5",
|
||||
"currentPage": "1",
|
||||
"showActionColumn": true,
|
||||
"showFiltersRow": true,
|
||||
"filter": true,
|
||||
"total": 10,
|
||||
"paginationPrefix": "/page",
|
||||
"params": {"class": "table table-bordered", "border": "1"}
|
||||
},
|
||||
"filters": [
|
||||
"email"
|
||||
],
|
||||
"data": [
|
||||
{"id": 1,"email":"fas1@mail.ru","description":"sdgsdfg","description2":"ffdghdas", "created_at": "17.06.2024", "status": "1"},
|
||||
{"id": 2,"email":"fas2@mail.ru","description":"fafdgdfgsdfdfs","description2":"ffdghdas", "created_at": "18.06.2024", "status": "1"},
|
||||
|
@ -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];
|
||||
}],
|
||||
|
Reference in New Issue
Block a user