File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -27,10 +27,14 @@ class ContinueWith extends BaseHtmlElement
2727 /** @var string */
2828 protected $ title ;
2929
30- public function __construct (Url $ url , $ filter )
30+ /** @var bool Whether the current query has results */
31+ protected bool $ hasResults = true ;
32+
33+ public function __construct (Url $ url , $ filter , bool $ hasResults = true )
3134 {
3235 $ this ->url = $ url ;
3336 $ this ->filter = $ filter ;
37+ $ this ->hasResults = $ hasResults ;
3438 }
3539
3640 /**
@@ -59,7 +63,7 @@ public function assemble()
5963 $ filter = Filter::all ($ baseFilter , $ filter );
6064 }
6165
62- if ($ filter instanceof Filter \Chain && $ filter ->isEmpty ()) {
66+ if (! $ this -> hasResults || ( $ filter instanceof Filter \Chain && $ filter ->isEmpty () )) {
6367 $ this ->addHtml (new HtmlElement (
6468 'span ' ,
6569 Attributes::create (['class ' => ['control-button ' , 'disabled ' ]]),
You can’t perform that action at this time.
0 commit comments