Skip to content

Commit

Permalink
fix: Expose TableSubscription.close() to JS (#6446) (#6448)
Browse files Browse the repository at this point in the history
- The close() method is only on `AbstractTableSubscription`, and it
appears that it doesn't automatically get added to the JS API even
though `TableSubscription` is defined as a `JsType`
- Explicitly add the method to `TableSubscription` as well.
- Fixes #6447

---------

Co-authored-by: Colin Alworth <[email protected]>
  • Loading branch information
mofojed and niloc132 authored Dec 5, 2024
1 parent b529e1f commit 303fd8e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import io.deephaven.web.shared.data.RangeSet;
import io.deephaven.web.shared.data.ShiftedRange;
import io.deephaven.web.shared.fu.JsRunnable;
import jsinterop.annotations.JsMethod;
import jsinterop.annotations.JsProperty;
import jsinterop.base.Any;
import jsinterop.base.Js;
Expand All @@ -51,6 +52,7 @@
* exposed to api consumers, rather than wrapping in a Table type, as it handles the barrage stream and provides events
* that client code can listen to.
*/
@TsIgnore
public abstract class AbstractTableSubscription extends HasEventHandling {
/**
* Indicates that some new data is available on the client, either an initial snapshot or a delta update. The
Expand Down Expand Up @@ -534,6 +536,7 @@ public JsArray<Column> getColumns() {
/**
* Stops the subscription on the server.
*/
@JsMethod
public void close() {
state.unretain(this);
if (doExchange != null) {
Expand Down

0 comments on commit 303fd8e

Please sign in to comment.