Declined
Last Updated: 21 May 2020 11:40 by ADMIN
Max
Created on: 07 May 2020 16:13
Category: Kendo UI for jQuery
Type: Bug Report
1
TabStrip insertBefore after an append without content doesn't work

Step by step instructions on how to reproduce the problem:

  1. Create a kendo tab strip
  2. Using the append method, add a "tab1"- do not specify any content in this new tab
  3. Using the insertBefore method, add a "tab2", this time specify some content
  4. Attempt to navigate the tabs and note what is showing in the content of each tab

Code snippets:

            var tabStrip = $("#contentlessAppend").kendoTabStrip({}).data('kendoTabStrip');
            tabStrip.append({
              text: "noContentAppend",
              //content: "With content" //Uncomment this line for normal functionality
            });
            tabStrip.insertBefore({
              text: "contentInsertBefore",
              encode: false,
              content: `<div id="WhereAmI">I am not where I should be</div>`
            }, tabStrip.tabGroup.children().eq(0) );

Screenshots of the problem:

 (N/A)

Stack trace, if applicable: N/A

Project and its dependencies which illustrates the problem (stripped, in zip format):

(see attached)

Attached Files:
3 comments
ADMIN
Ivan Danchev
Posted on: 21 May 2020 11:40

Hi Max,

Yes, we will consider the available options. I agree that adding this information to the TabStrip's documentation could avoid confusion with regard to the presence or lack of tab content.

Regards,
Ivan Danchev
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Max
Posted on: 14 May 2020 11:40

Hi Ivan Danchev,

Thank you  for your response.

In that case, would it be possible to add in something that would throw an error when a contentless tab is added to a contentful tabStrip, or when a contentful tab is added to a contentless tabStrip?

And/Or could the documentation be updated to show this information?

When I first encountered this it heavily threw me off.

 

Kind Regards,

Max

ADMIN
Ivan Danchev
Posted on: 14 May 2020 08:52

Hello Max,

The tabs in the TabStrip can either show content or not, alternatively. Eiher all tabs show content or none of the tabs shows content. When even a single tab has content set all tabs must have content, even if it is an empty string. This can be observed in the following dojo example: https://dojo.telerik.com/UfofIcUQ

Note that the second tab's content is not set: { text: "Tab1" } , as a result the first tabs content is not visible. So unless all the tabs will have no content, it must be set to each tab, even if it is empty, e.g. { text: "Tab1", content: "" }.

In the example you posted it would look like this: https://dojo.telerik.com/IRAHevIJ

Regards,
Ivan Danchev
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.