-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An error will be occured when call makeCustomButton method #51
Comments
Try; $this->makeCustomButton([
'name' => 'home',
'url' => url('/'),
'renderIf' => function(){
return true;
}
], static::$TYPE_ROW); Sorry, some of the docs are abit behind, but will update them |
And I find that I must set the protected $tableColumns = [
'id',
'title',
'status'
]; isn't in docs |
If you want to filter, use this approach, as documented here /**
* Set the columns to be displayed.
*
* @return void
* @throws \Exception if an error occurs during parsing of the data
*/
public function setColumns()
{
$this->columns = [
"id" => [
"label" => "ID",
"filter" => ["enabled" => true, "operator" => "="],
"styles" => ["column" => "grid-w-10"]
],
"name" => [
"search" => ["enabled" => true],
"filter" => ["enabled" => true, "operator" => "="]
],
"email" => [
"search" => ["enabled" => true],
"filter" => ["enabled" => true, "operator" => "="]
],
];
} The filter attribute on each column is used to create a filter. Do not use I will be updating the docs, fixing typos, etc to minimize the confusion. |
OK,thanks.Here's another problem,when I use filter the filter will skip value 0,but there are attributes like /**
* Check if provided user input can be used
*
* @param string|null $userInput
* @return bool
*/
public function canUseProvidedUserInput($userInput)
{
// skip empty requests
if ($userInput === null || empty(trim($userInput))) {
return false;
}
return true;
} In RowFilterHandler.php line 83, the method |
Thanks. I will look into that |
Appreciate for this project, it helps a lot!
And I find that an error will be occured when I call
makeCustomButton
like this(the parameter seems should be 'rows' but not 'row'):And after I set a
renderIf
attribute it works,like this:The text was updated successfully, but these errors were encountered: