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

Grid/Listbox provide an API to scroll itself by item index

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Done
    • 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
    • None

      Requirement Description

      developers want to scroll to a specific item in a browser under ROD enabled, e.g. scroll to 100th of 1000 items.

      Current problem

      • Grid.renderRow(row) and Grid.renderItems(Set<Row>) only work for a live model (ROD disabled).
      • scrollIntoView(component) requires to pass a Row, but calling Grid.getRows().getChildren().get(index) return null if the row is not renderd under ROD.
      • Grid.renderAll() enforces to render all items which could be inefficient when a model size is very large.

      Proposed solution

      provide an API Grid.scrollToIndex(index) which invokes a javascript move scroll position to the corresponding item of the index, so trigger the ROD to render the corresponding Rows.

            CharlesQiu CharlesQiu
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 2 days
                2d
                Remaining:
                Time Spent - 1 day, 2 hours Remaining Estimate - 6 hours
                6h
                Logged:
                Time Spent - 1 day, 2 hours Remaining Estimate - 6 hours
                1d 2h