Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Image input - Prevent the initial image from going back after removing


Hi,

https://preview.keenthemes.com/html/metronic/docs/forms/image-input#outline-style

Initialize an Image Input with the initial image as the above demo.

- Step 1: Upload a new image => Cancel button appears
- Step 2: Click on Cancel button to remove the new uploaded image => Initial image & Remove button appear => Reasonable
- Step 3: Click on Remove button to delete the existing image.
- Step 4: Upload a new image AGAIN => Cancel button appears
- Step 5: Click on Cancel button to remove the new uploaded image

=> The initial image & Remove button appear again which had been deleted from the Step 3

I know you have reason to bring back the initial image after cancelling the new uploaded image. However, this loop should be stopped after the Remove button is clicked.

Thanks


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (2)


Well, I think we should supply a method to set up/remove the initial image. In fact, we can save & remove images many times.

- Remove: we should clear the initial image in the component to prevent the above loop.
- Save: we should set up the NEW initial image. From this point, this image becomes the initial image which will be brought back if I upload another image then cancel it.

This is just my suggestion in hope that you can consider all cases any.

Thanks



Hi,

Thank you for your feedback. Good points.
We will check this further and consider those improvements.

Regards.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(