Fomantic-ui: [Tab] Cannot re-initialise tab settings

Created on 10 Jan 2020  路  7Comments  路  Source: fomantic/Fomantic-UI

Bug Report

Steps to reproduce

  1. Initialise a menu with tabs
  2. Initialise/modify two different tabs within that menu
  3. Only one of the tabs will get updated

Expected result

Individual tab should be able to update its settings

Actual result

Tab settings do not get updated.

Testcase

Demonstration:
Working v2.7.7
Broken v2.8.3

Worst case scenario, roll back #977 as it introduces issues that were not present before.

Caused by

977 / #1025

Version

2.8.3

lanjavascript

All 7 comments

Sorry @Kingo64 , in your example there are no elements with id 'second' and 'third' .
What I find interesting about your sample is that comparing to semantic UI, if you comment out the first line //$('.menu .item').tab(); then all the tabs will fire the 'onVisible' without any click on the tabs. This was not happening in the semantic. So before you add individual configuration to tabs you need to .tab( them all. I would interested in understanding your sample and what are the problems if you add the #second and #third id .

Yeah, looks like my jsfiddle has issues. It's really hard for me to provide a jsfiddle right now since I don't have access to the source code currently and cannot share anything directly. Essentially it generates the entire UI programmatically using Vue which can conditionally add and initialise Tab elements based on JSON configuration passed into the components. I've only been dealing with grief and broken Tabs ever since #977 went through.

I'll try and write up a better demo on where the issues up when I get some time.

Sorry for the long delay @ebreaur , I've written up new Sketchfab examples that demonstrate the issue showing that it worked fine in v2.7.7 and has been broken ever since #977 was merged.

@prudho Do you have some time to investigate into this and your PR which is mentioned above?
If i remember correctly you mentioned on discord you probably found a solution?

Hi guys, just checking in. Has there been any progress made on this ticket? Thanks.

@Kingo64 Well, you promised to provide a proper jsfiddle, dont you ? 馃槈
Anyway, the only thing which comes to my mind to fix this in some situations without reverting everything (which would introduce the old issues again) is to simply add another option to disable the whole check for an existing active tab.

This might also fix the issue @ibelar has

Proposal

autoTabActivation: false

would then "revert" the behavior
@prudho , i would quickly create a PR to introduce that new option , ok?

We are close to a new release, so i cannot promise to get this in 2.8.5 in time

With #1488 the old behavior can be forced again using autoTabActivation: false
See your adjusted jsfiddle here https://jsfiddle.net/mp6otbg7/

Was this page helpful?
0 / 5 - 0 ratings