Skip to content

Commit 35f8a3a

Browse files
authored
fix: DH-20500: Links without operators not working (deephaven#2541) (deephaven#2542)
Cherry-pick for Grizzly
1 parent a2f3bd6 commit 35f8a3a

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

packages/dashboard-core-plugins/src/linker/Linker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ export class Linker extends Component<LinkerProps, LinkerState> {
562562
// combine them so they could be set in a single call per target panel
563563
for (let i = 0; i < links.length; i += 1) {
564564
const { start, end, operator } = links[i];
565-
if (start.panelId === sourceId && end != null && operator != null) {
565+
if (start.panelId === sourceId && end != null) {
566566
const { panelId: endPanelId, columnName, columnType } = end;
567567
// Map of column name to column type and filter value
568568
const existingFilterMap = panelFilterMap.get(endPanelId);

packages/dashboard-core-plugins/src/linker/LinkerOverlayContent.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ import { LayoutUtils, PanelManager } from '@deephaven/dashboard';
1010
import Log from '@deephaven/log';
1111
import type { Container } from '@deephaven/golden-layout';
1212
import { vsGripper } from '@deephaven/icons';
13-
import { TypeValue as FilterTypeValue } from '@deephaven/filters';
13+
import {
14+
type TypeValue as FilterTypeValue,
15+
Type as FilterType,
16+
} from '@deephaven/filters';
1417
import clamp from 'lodash.clamp';
1518
import {
1619
isLinkableFromPanel,
@@ -308,7 +311,7 @@ export class LinkerOverlayContent extends Component<
308311
operator,
309312
startColumnType,
310313
type,
311-
};
314+
} as const;
312315
} catch (error) {
313316
log.warn('Unable to get point for link', link, error);
314317
return null;
@@ -345,7 +348,7 @@ export class LinkerOverlayContent extends Component<
345348
onClick={onLinkSelected}
346349
onDelete={onLinkDeleted}
347350
isSelected={selectedIds.has(id)}
348-
operator={operator}
351+
operator={operator ?? FilterType.eq}
349352
startColumnType={startColumnType}
350353
type={type}
351354
onOperatorChanged={this.handleOperatorChanged}

packages/dashboard-core-plugins/src/linker/LinkerUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export type LinkColumn = {
3636
};
3737

3838
export type LinkDataValue<T = unknown> = {
39-
operator: FilterTypeValue;
39+
operator?: FilterTypeValue; // Default behavior treats no operator as equals
4040
text: string;
4141
value: T;
4242
startColumnIndex: number;

packages/iris-grid/src/IrisGrid.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ function isEmptyConfig({
247247
}
248248

249249
export type FilterData = {
250-
operator: FilterTypeValue;
250+
operator?: FilterTypeValue; // Default behavior treats no operator as equals
251251
text: string;
252252
value: unknown;
253253
startColumnIndex: number;

0 commit comments

Comments
 (0)