Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48980

How to to filter the same data with 2 search bars - ReactJS

$
0
0

Hello,

I want some help here.
I want to filter the same data with 2 search bars, one to filter the names and the other one to filter the array of notes.

IF: I am only filtering by names => get Results (length > 0) OR length = 0.
ELSE IF: I am only filtering by names => get Results (length > 0) OR length = 0.
ELSE IF: I am filtering by both of them names & notes => get Results (length > 0) OR length = 0.
ELSE: Do nothing.

The interface looks like this:

interface StudentInterface {
    email: string;
    firstName: string;
    notes: string [];
    id: string;
    lastName: string;
}

Below is the screen-shot of the 2 search bars.
Any help is appreciated.
Thanks in advance.

image

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48980

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>