diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/tree/JsTreeTable.java b/web/client-api/src/main/java/io/deephaven/web/client/api/tree/JsTreeTable.java index 7163ae034d9..72e7ea11116 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/tree/JsTreeTable.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/tree/JsTreeTable.java @@ -599,7 +599,8 @@ private void replaceSubscription(RebuildStep step) { viewTicket.release(); viewTicket = null; } - case SUBSCRIPTION: + + // In all of the above cases, we replace the subscription if (stream != null) { stream.then(stream -> { stream.close(); @@ -607,6 +608,16 @@ private void replaceSubscription(RebuildStep step) { }); stream = null; } + break; + case SUBSCRIPTION: + // If it exists, adjust the existing subscription, otherwise create a new one + if (stream != null) { + stream.then(subscription -> { + subscription.setViewport(firstRow, lastRow, Js.uncheckedCast(columns), (double) updateInterval); + return null; + }); + return; + } } Promise stream = Promise.resolve(defer())