Page 1 of 1

Conditional Mapping Problem

Posted: Sat Dec 19, 2015 9:28 am
by taucher

Hello, I have an array of objects, i want to map them to a list component with a condition. I prepared my "if" condition, it works well with "mapping js". But mapping is also working for the needless objects. I used "else" condition with codereturn null /code or codereturn undefined /code for needless objects. But in the list component, there are empty items which are needless ones.

Note: I can't sort from the server or use server-side script. I must use client side js.


Conditional Mapping Problem

Posted: Sat Dec 19, 2015 3:51 pm
by Serhii Kulibaba

Hello,

Do you need to hide that elements? If so - please use JS code below:
$(element).hide();


Conditional Mapping Problem

Posted: Sat Dec 19, 2015 3:53 pm
by taucher

Yes, Thank you Sergiy.