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

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

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Normal
    • Resolution: Done
    • 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

      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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                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