I want to display the icon only its column value in the table is true.
if that column value is false then that row icon did not show .
But here if that any row is true all row icon is display.I want to show that one button who got the value is true
{likes.likes_status =true?
:null }
Vaibhav ChauhanPosted Jul 28, 2021, 5:12 AM
Let's try conditional function to return the icon you can print status value in console and check if it is correct:
function renderButton(likeStatus)
{
if(likeStatus){
return();
}
}
{this.renderButton(likes.likes_status)}
Vaibhav ChauhanPosted Jul 27, 2021, 1:21 PM
Hi,
I think there is some issue with that condition:
Try below code
{likes.likes_status ? : null }
Don't use likes.likes_status =true, Use likes.likes_status == true or don't use any comparison value it will automatiocally check for true value.
Sachin SinghPosted Jul 27, 2021, 1:20 PM