Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AJAX Tabs in 2.0 #2493

Closed
BigGrecian opened this issue Jul 2, 2015 · 6 comments
Closed

AJAX Tabs in 2.0 #2493

BigGrecian opened this issue Jul 2, 2015 · 6 comments
Milestone

Comments

@BigGrecian
Copy link

The loader has disappeared in version 2.0 and no longer displays whilst an ajax tab is being processed and sent by the server.

@jlukic
Copy link
Member

jlukic commented Jul 2, 2015

Please create a test case. Perhaps its just loading too quickly :).

AJAX tabs in 2.0 use session storage, which means if you have already loaded a tab once in a browser session it will reload instantly the next time.

@BigGrecian
Copy link
Author

Surely if the code is as follows it shouldn't cache :

 $('.fixed.home.menu .item')
  .tab({
    context : 'parent',
    auto    : true,
    alwaysRefresh : true,
    parseScripts : true,
    ignoreFirstLoad  : false,
    cache : false,
    path    : './', 

 });
  <a class="item" data-tab="statement.php">
    <i class="dollar icon"></i>Account
   </a>
 <div class="ui bottom attached tab segment" data-tab="statement.php">

 </div>

but when I look in the console under the network tab it is caching it and not reloading the page.
Used to work in 1.12.3 so not sure what's changed as I've set cache to false.

But when I look in the console it states :
image

@jlukic
Copy link
Member

jlukic commented Jul 2, 2015

Top level cache setting is not currently passing api settings correctly.

For now you can just fix with specifying API settings

$('.fixed.home.menu .item')
  .tab({
    context : 'parent',
    auto    : true,
    alwaysRefresh : true,
    parseScripts : true,
    ignoreFirstLoad  : false,
    apiSettings: {
      cache: false
    },
    path    : './', 
 });

Will fix.

@jlukic jlukic added this to the 2.0.x milestone Jul 2, 2015
@BigGrecian
Copy link
Author

Already tried that, unfortunately with no avail :
image

@jlukic
Copy link
Member

jlukic commented Jul 4, 2015

I'll fix in first patch, not sur whats going on.

@jlukic
Copy link
Member

jlukic commented Jul 6, 2015

I've fixed tab to go back to using its own internal caching, which should now be obeyed with cache: false. This was necessary as well for evaluateScripts: 'once'; to work correctly.

I've added additional examples to docs as well.

@jlukic jlukic closed this as completed Jul 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants