where put extended filter for tab.... #789
-
|
I want to have a filter in tab - it is quite easy - you have to edit and in config_filter2.yaml: But I want more complex filter. Normally I use But it works in normal columns executed by controller. Not in tabs in form... So WHERE!? I tried to put it in all related controllers and models. And even formFilterExtendScopes.... Nope. Wrong place: Undefined array key "my_advanced_filter" |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
public function relationExtendViewFilterWidget($filterWidget, $relation, $model)
{
$filterWidget->addScopes([
'my_advanced_filter' => [
'label' => 'Stan na dzień',
'type' => 'date',
'conditions' => "very complex sql",
'default' => Carbon::now(),
],
]);
} |
Beta Was this translation helpful? Give feedback.
-
|
Found it. It is very strange. But - if you made listFilterExtendScopes - you have to create config_filter like this: if you use just: no filter appears BUT if you use:
everything works but if you use: Undefined array key "my_relation_filter" error appears |
Beta Was this translation helpful? Give feedback.
@SledgehammerPL