Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-3950

Accordion mold tabbox doesn't properly resize when adding or removing items dynamically

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.5.2
    • 8.5.1.2
    • None
    • Security Level: Jimmy
    • None
    • ZK 8.5.2 S1, ZK 8.5.2 S2

      Steps to Reproduce

      Run fiddle
      http://zkfiddle.org/sample/2gi5f6u/4-tabbox-accordion-resize-bug
      Click on the button to toggle tab 3 visibility
      When added or removed, the view is not updated.
      After adding or removing, manually select a tab to update the current view

      Current Result

      tab position / active tabpanel size is not automatically updated when adding a new entry

      Expected Result

      adding a new entry should update the size / position of current entries to match

      Debug Info

      Root Cause

      Workaround

      		<script><![CDATA[
      		zk.afterLoad('zul.tab', function() {
      			var xTab = {};
      			zk.override(zul.tab.Tab.prototype, xTab ,{
      				setVisible : function(visible) {
      					var result = xTab.setVisible.apply(this, arguments);
      					if(this.getTabbox().inAccordionMold() && this.getTabbox()._selTab && this.getTabbox()._selTab.getLinkedPanel())
      						zUtl.fireShown(this.getTabbox()._selTab.getLinkedPanel());
      					return result;
      				}
      			});//zk.override
      		});//zk.afterLoad
      		]]></script>
      
      

            CharlesQiu CharlesQiu
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 1 day
                1d
                Remaining:
                Time Spent - 3 hours Remaining Estimate - 5 hours
                5h
                Logged:
                Time Spent - 3 hours Remaining Estimate - 5 hours
                3h