taucher
Posts: 0
Joined: Fri Apr 17, 2015 6:06 am

Conditional Mapping Problem

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.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Conditional Mapping Problem

Hello,

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

taucher
Posts: 0
Joined: Fri Apr 17, 2015 6:06 am

Conditional Mapping Problem

Yes, Thank you Sergiy.

Return to “Issues”