Can remove Upload customListItem from UI, but removeURL with method is not being fired.

1 Answer 406 Views
Upload
Adrian
Top achievements
Rank 1
Adrian asked on 14 May 2021, 10:03 PM

```

<button 
                                        type="button"
                                        className="k-button -k-button-icon k-flat k-upload-action" 
                                        
                                        onClick={(e) => this.actualUploader.current.onRemove(el.uid)}
                                        tabIndex="-1"
                                    >
                                        <span aria-label="Remove" title="Remove" className="k-icon k-delete k-i-x">
                                        </span>
                                        {/* remove (doesnt work yet) */}

                                    </button>

 

```

 

I'm using a ref to access the 'Upload' react element and fire the onRemove method. My assumption is that it will interact with my removeURL using the DELETE method which I've specified. However, I can only get the image to disappear from the state, and no HTTP Request is fired. What can I do to get this HTTP method fired?

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 17 May 2021, 08:24 AM

Hello, Adrian,

We made an example using custom item UI and using the onRemove that comes directly from the props.

After the remove button is clicked, the request to the removeURL is correctly sent:

https://stackblitz.com/edit/react-qvxy4m-uh2zmf?file=app/main.jsx

If the issue still occurs, please share an example reproducing it and I will be happy to take a look.

Regards,
Stefan
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Upload
Asked by
Adrian
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or