Skip to content

Commit 197dc48

Browse files
committed
fix: remove redundant validation for empty refCaption and refCaptionExp
1 parent 1ef7975 commit 197dc48

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -119,21 +119,5 @@ 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-
138122
return errors;
139123
}

0 commit comments

Comments
 (0)