Calling Delete leads to unpredictable results

If programmer call Delete() - it would leads to unpredictable results in some cases, since the programmer have no way to know which objects is currently active by a programming way, but just only visually, and if there is nothing clicked - it will be deleting the last ?!, and which is "the last" if there is no list of objects ?!


3 Replies

VR Vignesh Ramesh Syncfusion Team January 17, 2022 05:05 PM UTC

Hi Yordan Yanakiev, 

Thanks for contacting Syncfusion support. 

The Delete method only deletes the selected item otherwise no items will be deleted. Ie., If suppose no item is selected, then it will not delete any item from the ImageEditor when calling it. Already, we have documented the behavior in our user guide. Please get the documentation link below 


If suppose you are facing any problem in this behavior. Please revert us with a replication scenario. It would help us to provide you with a better solution at the earliest. 

Regards, 
Vignesh Ramesh.


YO Yordan January 17, 2022 06:44 PM UTC

the problem persists.

Here to reproduce it.


- add 3 images.

- call Delete() function.

- select one of the images left - check their properties from select or unselect - it's all returned - zero ( 0 )



VR Vignesh Ramesh Syncfusion Team January 18, 2022 04:27 PM UTC

Hi Yordan Yanakiev, 

We have prepared a simple image editor sample and checked the reported problem with the replication steps, as we have informed in our previous update, the Delete method didn't delete any items when we have not selected them. So, we have deleted 2 items by selecting them after that check the remaining item’s properties from the ItemSelected event, it retains correctly. Please check the tested sample and video from the below link. 


If you still face any problem, can you revert by modifying the sample based on your application scenario along with replication steps, this will help us to proceed further. 

Regards, 
Vignesh Ramesh.

Loader.
Up arrow icon