Image input control in mobile is not clearing value or reset

what is the way to clear the value of a image input control. I tried both reset and clear value option for this, but component still displays the previous upload image.

Hi there,

Thanks for reaching out to us!

Can you provide more detail as to how imageInput.clearValue() and .resetValue() are not working for you?

I've just tested this using the button component to trigger the clear value function.

As well as a JavaScript Query:

Both methods worked in a simple app. Are there any errors your are seeing when you try to run these functions?

@DanBlonc . Appreciate it.

  1. I tried both the method. Using button event handler and JavaScript query. but the image is displayed in the component.

  2. When i check the state property of the imageinputcomponent, the value property is null, but one record is visible in the file property. Please refer the screenshot. Am i missing something ?

@DanBlonc For your information, currently the imageinput component is placed inside container within a form control

Thanks for that info. I tried recreating it in this app and still was not able to do so. Does this occur for you in this app?
imagetest.json (13.4 KB)

Does this occur if you were to add a new image input and using those methods on it? It could be possible that this current input is in an odd state.

@DanBlonc Yes, the new image input component worked without issue. I have deleted the old. Its sorted.

But this characteristic confused me and took lot of troubleshooting effort. :slight_smile:

Thanks for confirming!

At times, components could get into weird states and not work as expected. In those moments, we recommend deleting the component, adding a new one with a new name and seeing if the behavior persists.

I'm glad you're unblocked here. Have a great day!