Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

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
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • 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
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(