title: I am using React Bootstrap Modal and React-dropzone to Add and Edit image. Issue with Bootstrap Modal closing
body: <p>So, I am using React Bootstrap Modal and React-dropzone to Add and Edit the banner. The issue here is when I try to Edit the banner and drop the image to dropzone, for some reason Modal closes itself automatically. This does NOT happen when I Add new banner to the website.
  I am using same function for both Add and Edit features. But for some reason the Modal closes when I try to upload image in Edit part.</p>
  <p>Below is the function for selecting the image from local machine.</p>
  <pre><code>const onDrop = useCallback(
      (acceptedFiles) =&gt; {
        dispatch(
          uploadImageAction({
            uploadPath: `native_ads/${offerVariantId}`,
            files: acceptedFiles,
          })
        );
      },
      [dispatch, uploadImageAction, offerVariantId]
    );
  </code></pre>
  <p>Below is the Function for Edit button:</p>
  <pre><code>const onEditBannerFormSubmit = useCallback(
      async (dataArray) =&gt; {
        dispatch(updateBannerAction(dataArray[0]));
      },
      [dispatch]
    );
  
    const editModalForm = useCallback(
      (object) =&gt; (
        &lt;BannerModalForm
          onSubmit={onEditBannerFormSubmit}
          modalTitle={t('imageCreatives:editCreative')}
          object={object}
        /&gt;
      ),
      [onEditBannerFormSubmit, t]
    );
  </code></pre>
  <p>Here is the function for the Add function</p>
  <pre><code>const onAddBannerFormSubmit = async (dataArray) =&gt; {
      dataArray.forEach((dataItem) =&gt; {
        dispatch(createBannerAction(dataItem));
      });
    };
  
  const addModalForm = (
      &lt;BannerModalForm
        onSubmit={onAddBannerFormSubmit}
        modalTitle={t('imageCreatives:newBannerCreative')}
        introTitle={t('imageCreatives:uploadYourBannerCampaigns')}
        introContent={t('imageCreatives:welcomeNote')}
      /&gt;
    );
  </code></pre>
  <p>You can see the video below for the reference:</p>
  <p><a href="https://www.youtube.com/watch?v=tWrTV_hTZG4" rel="nofollow noreferrer">https://www.youtube.com/watch?v=tWrTV_hTZG4</a></p>