cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5: Change sap.m.List delete icon

benlim
Contributor
0 Kudos

Hi,

I've check the answer provided in below thread but seems the UI5 has been updated which cause the solution does not work. Any idea how can I change the icon to sap delete icon sap-icon://delete ?

How do I change sap.m.List delete icon?

Thanks.

Regards,

-Ben-

Accepted Solutions (1)

Accepted Solutions (1)

saivellanki
Active Contributor
0 Kudos

Hi Ben,

Here you go - Delete Icon -- List

Regards,

Sai.

benlim
Contributor
0 Kudos

Hi Sai,

Thanks for your solution. It works well in jsbin but does not work in my app. I'm getting error Uncaught TypeError: oDeleteControl.setIcon is not a function. Not sure why it does not work for set icon but it works for setTooltip.

Regards,

Ben

saivellanki
Active Contributor
0 Kudos

Can you please tell me which version of UI5 are you using?

Regards,

Sai.

benlim
Contributor
0 Kudos

I'm using version 1.48.6

Regards,

-Ben-

saivellanki
Active Contributor
0 Kudos

Hello Ben,

In 1.48.6, the setIcon method doesn't exist. Please try setSrc, it should work.

oDeleteControl.setSrc("sap-icon://delete");

Regards,

Sai.

benlim
Contributor
0 Kudos

Thanks Sai! It's working after using setSrc!

Regards

-Ben-

0 Kudos

Hi Ben/ Sai,

Even I am facing problem after making the code changes as specified by 'Sai'. Can you please tell me where I am going wrong.

xml-view.png

The output is still not showing the 'delete' icon differently.

Thanks,

Sravan

0 Kudos

In addition to that the output looks as the attached screen shot. I am using version '1.56.0'

Answers (0)