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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.5.1.2
    • Fix Version/s: 8.5.2
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None
    • gh.sprint.customfield.default.name:
      ZK 8.5.2 S1, ZK 8.5.2 S2

      Description

      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>
      
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                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