Developer forum

Forum » Rapido » CustomerCenterList component

CustomerCenterList component

Mafalda Correa
Mafalda Correa
Reply

I was playing around with the new CustomerCenterList component and realised that when we use the onclick property, it adds the onclick attribute to all <td>s except for the last one.

I went and looked at the component code and it seems like this was done intentionally:

string columnClick = columnCount < (totalColumns-1) ? "onclick=\"" + listItem.OnClick + "\"" : "";

<td @ComponentMethods.AddAttributes(infoAttributes) @columnClick class="data-list__info-item dw-mod">ยด~

I'm curious as to why this is done like this? Why would we want to apply the onclick property on all cells except for the last one?

Or is this a bug?

 


Replies

 
Nicolai Pedersen
Reply

Because the last cell usually holds links to other actions - and those actions have links. So we do not want a link on the cell as then we would have double links...

 

You must be logged in to post in the forum