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

Vertical scroll appear when remove last listitem from Listbox

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 6.5.5
    • None
    • None
    • Firefox/Chrome

      Pretty much what summary said.

      Here is the example code, click LAST item and then delete it with button.

      <div>
          <zscript>Object[] o = new Object[10];</zscript>
          <button id="btn" label="delete" onClick="deleteSelection();"/>
          <listbox id="list" width="300px" checkmark="true" multiple="true">
              <listhead>
                  <listheader>
                      <label value="Column"/>
                  </listheader>
              </listhead>
              <listitem forEach="${o}">
                  <listcell label="value"/>
              </listitem>
          </listbox>
          <zscript>
              <![CDATA[
                  public void deleteSelection() {
                      for(Listitem item : list.getSelectedItems()) {
                          list.removeItemAt(item.getIndex());
                      }
                  }
              ]]>
          </zscript>
      </div>
      

      Currently "hack" is to overwrite CSS overflow property.

      <style>
          .no-scroll-bar .z-listbox-body {
             overflow: hidden;
          }
      </style>
      

            danchen0720 danchen0720
            rangilin rangilin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: