Skip to content

Commit 83490e2

Browse files
authored
fix: Expose offset property on JS TreeViewportData (deephaven#6639)
Fixes DH-18523
1 parent ca14e8a commit 83490e2

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

web/client-api/src/main/java/io/deephaven/web/client/api/subscription/AbstractTableSubscription.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -411,9 +411,9 @@ public UpdateEventData(WebBarrageSubscription subscription, int rowStyleColumn,
411411
subscription.getServerViewport(), subscription.isReversed()));
412412
}
413413

414-
// for ViewportData
414+
// for ViewportData, TreeViewportData
415415
@JsProperty
416-
public Double getOffset() {
416+
public double getOffset() {
417417
return offset;
418418
}
419419

web/client-api/src/main/java/io/deephaven/web/client/api/subscription/ViewportData.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
public interface ViewportData extends TableData {
2323

2424
/**
25-
* The position of the first returned row, null if this data is not for a viewport.
25+
* The position of the first returned row within the table.
2626
*/
2727
@JsProperty
28-
Double getOffset();
28+
double getOffset();
2929

3030
@JsProperty
3131
@Override

web/client-api/src/main/java/io/deephaven/web/client/api/tree/TreeViewportData.java

+10
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
import jsinterop.annotations.JsProperty;
1010
import jsinterop.annotations.JsType;
1111

12+
/**
13+
* Similar to {@link io.deephaven.web.client.api.subscription.ViewportData}, but with additional properties to reflect
14+
* the tree structure.
15+
*/
1216
@JsType(namespace = "dh")
1317
public interface TreeViewportData extends TableData {
1418
@JsProperty
@@ -24,6 +28,12 @@ default TableData.Row get(RowPositionUnion index) {
2428
@Override
2529
JsArray<TableData.@TsTypeRef(TreeRow.class) Row> getRows();
2630

31+
/**
32+
* The position of the first returned row within the tree.
33+
*/
34+
@JsProperty
35+
double getOffset();
36+
2737
/**
2838
* Row implementation that also provides additional read-only properties. represents visible rows in the table, but
2939
* with additional properties to reflect the tree structure.

0 commit comments

Comments
 (0)