src/ItemsPerPageSelector.php
public function onPageLengthSelect($fx = null)
    {
        if (is_callable($fx)) {
            if ($this->cb->triggered()) {
                $this->cb->set(function () use ($fx) {
                    $ipp = @$_GET['ipp'];
                    //$this->pageLength->set(preg_replace("/\[ipp\]/", $ipp, $this->label));
                    $this->set($ipp);
                    $reload = call_user_func($fx, $ipp);
                    if ($reload) {
                        $this->app->terminate($reload->renderJSON());
                    }
                });
            }
        }
    }
public function onPageLengthSelect($fx = null)
    {
        if (is_callable($fx)) {
            if ($this->cb->triggered()) {
                $this->cb->set(function () use ($fx) {
                    $ipp = @$_GET['ipp'];
                    //$this->pageLength->set(preg_replace("/\[ipp\]/", $ipp, $this->label));
                    $this->set($ipp);
                    $reload = call_user_func($fx, $ipp);
                    if ($reload) {
                        $this->app->terminate($reload->renderJSON());
                    }
                });
            }
        }
    }
public function onPageLengthSelect ( $ fx = null ) { if ( is_callable ( $ fx ) ) { if ( $ this -> cb -> triggered ( ) ) { $ this -> cb -> set ( function ( ) use ( $ fx ) { $ ipp = @ $ _GET [ 'ipp' ] ; //$this->pageLength->set(preg_replace("/\[ipp\]/", $ipp, $this->label)); $ this -> set ( $ ipp ) ; $ reload = call_user_func ( $ fx , $ ipp ) ; if ( $ reload ) { $ this -> app -> terminate ( $ reload -> renderJSON ( ) ) ; } } ) ; } } }
Run callback when an item is select via dropdown menu.
The callback should return a View to be reload after an item
has been select.

@param null $fx
Run callback when an item is select via dropdown menu . The callback should return a View to be reload after an item has been select .