Yii Framework Forum: Howto maintain selected Tab after content refresh - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Howto maintain selected Tab after content refresh Rate Topic: -----

#1 User is offline   Kimmo 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 14-April 15

Posted 03 June 2015 - 11:07 AM

My scenario: Have yii\bootstrap\Tabs as a container for two tabs, both containing a yii\grid\GridView. Say, first for Cats and second for Dogs. Both GridViews are constructed by associated dataProvider and filterModel. When I sort or filter my latter Tab/GridView "Dogs", the view is refreshed and Tab is focused to the first Tab, being "Cats".

My first wish: How to prevent the focus from moving to first (default) tab when sorting/filtering the latter GridView?

My second wish: How to get information about the selected Tab in PHP -side? I could save the selection in an PHP object, and retrieve for future (naturally sessionwise) use. I wish not involve Javascript, neither cookies.

My third wish: Please stick to Yii2.

Thanks in advance!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users