etr2460 commented on a change in pull request #12341:
URL: https://github.com/apache/superset/pull/12341#discussion_r554603407



##########
File path: 
superset-frontend/src/views/CRUD/annotationlayers/AnnotationLayerModal.tsx
##########
@@ -111,6 +111,13 @@ const AnnotationLayerModal: 
FunctionComponent<AnnotationLayerModalProps> = ({
   // Functions
   const hide = () => {
     setIsHidden(true);
+
+    // Reset layer
+    setCurrentLayer({
+      name: '',

Review comment:
       same comment here

##########
File path: superset-frontend/src/views/CRUD/annotation/AnnotationModal.tsx
##########
@@ -114,6 +114,16 @@ const AnnotationModal: 
FunctionComponent<AnnotationModalProps> = ({
   // Functions
   const hide = () => {
     setIsHidden(true);
+
+    // Reset annotation
+    setCurrentAnnotation({
+      short_descr: '',

Review comment:
       looks like this object is used twice, let's define it as a constant at 
the top of the file and use it as needed throughout this function




----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to