You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/01/10 18:15:50 UTC

[GitHub] [superset] etr2460 commented on a change in pull request #12341: fix: annotation layer modal err handling

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org