leantony / laravel-grid

A grid view for laravel, inspired by the yii2 grid widget
https://leantony.github.io/laravel-grid/
MIT License
91 stars 39 forks source link

remove search panel #84

Open serhatso opened 5 years ago

serhatso commented 5 years ago

Hi,

I am trying to remove search panel from the grid. I have found the function withoutSearchForm() in RendersGrid.php. This function seems to be used in one of the tests so I suppose it should actually work. Here is how I create and render the grid:


public function index(KeysGridInterface $keysGrid, Request $request)
    {

        return $keysGrid
                ->create(['query' => Key::latest(), 'request' => $request])
                ->withoutSearchForm()
                ->renderOn('home.manage-keys.index');

    }

But the search form is still there. The function withoutSearchForm() doesn't seem to change anything.

Could you please help me understand how I need to call it?

Thanks in advance

leantony commented 5 years ago

Will look into it. I've not been on github for a while.