Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import io.deephaven.web.shared.data.ConnectToken;
import io.deephaven.web.shared.fu.JsBiConsumer;
import io.deephaven.web.shared.fu.JsFunction;
import jsinterop.annotations.JsNullable;
import jsinterop.annotations.JsOptional;
import jsinterop.annotations.JsType;
import jsinterop.base.Js;
Expand All @@ -32,6 +33,16 @@

@JsType(namespace = "dh")
public class CoreClient extends HasEventHandling {
/**
* A collection of feature flags that the JS API advertises. All must be nullable booleans, and if listed, the value
* is true.
* <p>
* Marked as nullable as past releases will not have this property, be sure to test for null if an older release
* might be in use.
*/
@JsNullable
public static final Features FEATURES = new Features();

public static final String EVENT_CONNECT = "connect",
EVENT_DISCONNECT = "disconnect",
EVENT_RECONNECT = "reconnect",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//
// Copyright (c) 2016-2026 Deephaven Data Labs and Patent Pending
//
package io.deephaven.web.client.api;

import io.deephaven.web.client.api.tree.JsTreeTable;
import jsinterop.annotations.JsNullable;
import jsinterop.annotations.JsType;

/**
* Collection of feature flags that the JS API advertises. All must be nullable booleans, and if listed, the value is
* true.
* <p>
* Preferred format is to first list the type or category of feature, then the feature name. Docs should link
* bidirectionally with the feature in question.
*
* Exposed as {@link CoreClient#FEATURES}, which may be null in older releases.
*/
@JsType(namespace = "dh")
public class Features {
/**
* {@link io.deephaven.web.client.api.tree.JsTreeTable} support for providing a number rather than a boolean when
* {@link io.deephaven.web.client.api.tree.JsTreeTable#expand(JsTreeTable.RowReferenceUnion, JsTreeTable.ExpandDescendantsUnion)
* expanding} to signify expanding to a depth relative to the given element.
*/
@JsNullable
public final Boolean treeTableExpandToDepth = true;
}
Original file line number Diff line number Diff line change
Expand Up @@ -926,13 +926,14 @@ private void setRowAction(RowReferenceUnion row, double action) {
* {@code true} to expand the row and all descendants, a {@code number} to expand to a specified depth relative to
* the target node, or omit / pass {@code false} to expand only the row itself. A depth of 1 is equivalent to a
* regular expand (one level). A depth of 2 expands the node and its children, etc. Equivalent to
* {@code setExpanded(row, true)} with an optional third parameter.
* {@code setExpanded(row, true)} with an optional third parameter. Numeric value is only supported if
* {@link Features#treeTableExpandToDepth} is true.
*
* @param row The row to expand - either the absolute row index or the row object.
* @param expandDescendants Controls descendant expansion: {@code true} for all descendants, a {@code number} for
* depth-limited expansion (relative to the target node), or {@code false}/omitted for a single level.
*/
public void expand(RowReferenceUnion row, @JsOptional ExpandDescendantsUnion expandDescendants) {
public void expand(RowReferenceUnion row, @JsOptional @JsNullable ExpandDescendantsUnion expandDescendants) {
setExpanded(row, true, expandDescendants);
}

Expand Down Expand Up @@ -1037,7 +1038,7 @@ default int asInt() {
* Defaults to {@code false}.
*/
public void setExpanded(RowReferenceUnion row, boolean isExpanded,
@JsOptional ExpandDescendantsUnion expandDescendants) {
@JsOptional @JsNullable ExpandDescendantsUnion expandDescendants) {
// TODO check row number is within bounds
final double action;
if (!isExpanded) {
Expand Down
Loading