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

CE listbox missing sizing trigger on

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 9.5.0
    • 9.0.1.2
    • None
    • None
    • ZK CE

    • None

      Steps to Reproduce

      https://zkfiddle.org/sample/1fk5tle/2-missing-listbox-size-event-CE

      Run in a CE context

      Click button

       

      Current Result

      Listbox adds the new rows, but doesn't resize (not flexing). The listbox grows outside of the screen incorectly.

      Expected Result

      Listbox just normally trigger a flex sync and flex calculation is applied

      Debug Information

      The interval_added internal event need to trigger partial invalidate

      https://github.com/zkoss/zk/blob/678daef08e6005f7e1acb4036679868e8c2898fa/zul/src/org/zkoss/zul/impl/ListboxDataLoader.java#L118

      This only happen if there is no other even triggering a full invalidate in the execution, and if the added rows are > invalidate threshold of the listbox, and if the original listbox wasn't empty

      Workaround

       

      <script><![CDATA[ 
              zk.afterLoad("zk", function () {
                  var _xcmd1 = {};
                  zk.override(zAu.cmd1, _xcmd1, {
                      outerPartial: function(a, b, c) {
                          var result = _xcmd1.outerPartial.apply(this, arguments);
                          var target = a;
                          setTimeout(function(){
                              zUtl.fireSized(zk.$(a.uuid));
                          },0);
                          return result;
                      }
                   });
              });
          ]]></script>
      

       

       

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

              Created:
              Updated:
              Resolved: