Skip to content

Commit 8575590

Browse files
committed
Fix empty formula bug
1 parent dbbe33a commit 8575590

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

packages/iris-grid/src/sidebar/CustomColumnInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function CustomColumnInput({
4646
const isValidName = name === '' || DbNameValidator.isValidColumnName(name);
4747
const handleFormulaEditorContentChanged = useCallback(
4848
(formulaValue?: string) => {
49-
if (formulaValue !== undefined && formulaValue !== '') {
49+
if (formulaValue !== undefined) {
5050
formulaValue.replace(/(\r\n|\n|\r)/gm, ''); // remove line break
5151
onChange(eventKey, INPUT_TYPE.FORMULA, formulaValue);
5252
}

packages/iris-grid/src/sidebar/InputEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export default class InputEditor extends Component<
119119
handleContentChanged(): void {
120120
const { onContentChanged } = this.props;
121121
const value = this.editor?.getModel()?.getValue();
122-
if (value !== '' && value !== undefined) {
122+
if (value !== undefined) {
123123
this.setState({ isEditorEmpty: value.length === 0 });
124124
}
125125
onContentChanged(value);

0 commit comments

Comments
 (0)