Skip to content

Commit d05888a

Browse files
committed
chore: typo fix
1 parent 5486635 commit d05888a

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

packages/pluggableWidgets/datagrid-dropdown-filter-web/src/DatagridDropdownFilter.editorConfig.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,5 +119,21 @@ export const getPreview = (values: DatagridDropdownFilterPreviewProps, isDarkMod
119119
export function check(_props: DatagridDropdownFilterPreviewProps): Problem[] {
120120
const errors: Problem[] = [];
121121

122+
const isEmpty = (value: string | undefined): boolean => !value || value.trim() === "";
123+
124+
if (_props.baseType === "ref") {
125+
if (_props.refCaptionSource === "attr" && isEmpty(_props.refCaption)) {
126+
errors.push({
127+
property: "refCaption",
128+
message: "Caption cannot be empty if the source is attribute"
129+
});
130+
} else if (_props.refCaptionSource === "exp" && isEmpty(_props.refCaptionExp)) {
131+
errors.push({
132+
property: "refCaptionExp",
133+
message: "Caption cannot be empty if the source is expression"
134+
});
135+
}
136+
}
137+
122138
return errors;
123139
}

packages/pluggableWidgets/datagrid-dropdown-filter-web/src/DatagridDropdownFilter.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@
8282
<enumerationValue key="exp">Expression</enumerationValue>
8383
</enumerationValues>
8484
</property>
85-
<property key="refCaption" type="attribute" dataSource="refOptions" required="false">
85+
<property key="refCaption" type="attribute" dataSource="refOptions" required="true">
8686
<caption>Caption</caption>
8787
<description />
8888
<attributeTypes>
8989
<attributeType name="String" />
9090
</attributeTypes>
9191
</property>
92-
<property key="refCaptionExp" type="expression" dataSource="refOptions" required="false">
92+
<property key="refCaptionExp" type="expression" dataSource="refOptions" required="true">
9393
<caption>Caption</caption>
9494
<description />
9595
<returnType type="String" />

packages/pluggableWidgets/datagrid-web/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
### Added
10+
11+
- We fixed an issue where missing consistency checks for the captions were causing runtime errors instead of in Studio Pro
12+
913
## [3.6.0] - 2025-10-01
1014

1115
### Fixed

0 commit comments

Comments
 (0)