This is a migrated thread and some comments may be shown as answers.

ContentUrls array not updated after removing a tab

3 Answers 117 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Henry
Top achievements
Rank 1
Henry asked on 18 Aug 2017, 11:44 AM

I have a tabstrip with multiple tabs, and each tab has its own contentUrl, so data is fetched using ajax.

I noticed that if you delete a tab, and reload the selected tab, it uses the old url from the removed tab. The tabstrip's contentUrls array still has the old values, that probably causes this.

Steps to reproduce:

1) Create a tabstrip with two tabs, with contentUrl set for both separately

2) Select the second tab

3) Remove the first tab (remove())

4) Reload the selected tab (select() and reload())

I suppose I need to manually update the contentUrls array?

3 Answers, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 22 Aug 2017, 09:03 AM
Hello Henry,

I tried to reproduce the behavior in question, but to no avail. Here's a dojo example which follows the described scenario. The "Engine" tab is reloaded successfully after removing the first tab and continues to display the correct content. Could you modify the dojo example accordingly so that the issue is reproduced and link it back for further review?

Regards,
Ivan Danchev
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Henry
Top achievements
Rank 1
answered on 07 Sep 2017, 07:42 AM

Hi Ivan,

thanks for testing this. It turned out, that with our Kendo version (2016.3.1118) tabstrip.options.contentUrls didn't update when removing tabs. Please see slightly modified dojo that uses that version, and outputs the tabstrip to console: dojo

The solution for me was to get the tab's contentUrl from the link element instead. In my app, I need to modify the url before reloading the tab.

0
Ivan Danchev
Telerik team
answered on 11 Sep 2017, 06:58 AM
Hi Henry,

Thank you for the follow up, I am glad you found a solution. Indeed the TabStrip in version 2016.3.1118 keeps the contentUrls of removed tabs.

Regards,
Ivan Danchev
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
TabStrip
Asked by
Henry
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Henry
Top achievements
Rank 1
Share this question
or