Filter GridView remove initialized get parameters

I am redirecting to an action that is receiving a GET parameters to filter a GridView. Clicking on each card will redirect to index action passing a GET parameters.

Here is the code:
image

After searching on the GridView, i noticed that the parameters that I passed on the action is concatenated on the filterModel. As you can see there are multiple “status” parameter

I tried to use POST method and it is working as expected, but refreshing the browser will alert the user like this. I guess I will have to pass on this one as it is also redundant to put multiple forms just to POST values instead of passing GET parameters on the url.

Someone help me please. Thanks.

In this case you need to set filterUrl in your GridView. When the user makes change to any filter input, the current filtering inputs will be appended as GET parameters to current URL if this option is not set.

GridView::widget([ 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'filterUrl' => Url::to(['controller/action']) ]);