diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index b49fcdd88..1f385a82e 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -9,6 +9,7 @@ - **Segment** - Fixed incorrect margin set on `attached segment` #2503 - **Card** - `centered cards` variation now works similar to `centered card`. #2520 - **Checkbox** - Fixed issue in chrome where radio checkbox would appear incorrectly when no default value was selected #2505 +- **Tab** - Tab now correctly obeys `cache` setting. Removed use of API's local caching by default. #2493 **Additional Bugs** - **Dimmer** - Dimmer now removes variations like `blurring` and `inverted` when `destroy` is called. diff --git a/src/definitions/modules/tab.js b/src/definitions/modules/tab.js index 57cbb24d7..e1860d8b3 100644 --- a/src/definitions/modules/tab.js +++ b/src/definitions/modules/tab.js @@ -440,9 +440,12 @@ $.fn.tab = function(parameters) { var $tab = module.get.tabElement(tabPath), apiSettings = { - dataType : 'html', - on : 'now', - cache : 'local', + dataType : 'html', + on : 'now', + cache : settings.alwaysRefresh, + headers : { + 'X-Remote': true + }, onSuccess : function(response) { module.cache.add(fullTabPath, response); module.update.content(tabPath, response); @@ -486,12 +489,9 @@ $.fn.tab = function(parameters) { module.debug('Content is already loading', fullTabPath); } else if($.api !== undefined) { - requestSettings = $.extend(true, { - headers: { - 'X-Remote': true - } - }, settings.apiSettings, apiSettings); + requestSettings = $.extend(true, {}, settings.apiSettings, apiSettings); module.debug('Retrieving remote content', fullTabPath, requestSettings); + module.set.loading(tabPath); $tab.api(requestSettings); } else {