Page Size Dropdown? Listview/gridview

Has anyone successfully done a page size drop down for listview / gridview?

If so, could you please share!

I was trying to do it in the Yii1 way but setState was removed from Yii2. I tried to use session variables and Pjax but I just cant seem to get it to work and update the gridview / listview.

Try it