rfellows commented on code in PR #8734:
URL: https://github.com/apache/nifi/pull/8734#discussion_r1589291907


##########
nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/property-table/editors/nf-editor/nf-editor.component.ts:
##########
@@ -207,8 +218,18 @@ export class NfEditor implements OnDestroy {
 
     okClicked(): void {
         const valueControl: AbstractControl | null = 
this.nfEditorForm.get('value');
-        if (valueControl) {
-            this.ok.next(valueControl.value);
+        const emptyStringChecked: AbstractControl | null = 
this.nfEditorForm.get('setEmptyString');
+        if (valueControl && emptyStringChecked) {
+            const value = valueControl.value;
+            if (value === '') {
+                if (emptyStringChecked.value) {
+                    this.ok.next('');
+                } else {
+                    this.ok.next(null);
+                }
+            } else {
+                this.ok.next(value);
+            }

Review Comment:
   Not sure where else to leave this comment, but we need to prevent `Enter` 
from submitting the okClicked action if the form is invalid (required value not 
entered)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to