Skip to content Skip to sidebar Skip to footer

Where Did I Make The Mistake Of Changing My Search Filter? And How To Fix It?

I have a list of airplanes departing or arriving at the airport and i also had a search filter where i enter the time of arrival or departure and filtering of the airplanes. I do t

Solution 1:

An example value of x["planeTypeID.code"] is "B734", of state.day "23-08-2019" => those are 2 different fields => you will get an empty array when you filter by x["planeTypeID.code"].includes(state.day) ¯\_(ツ)_/¯

After debugging via comments, the most likely solution is:

x["planeTypeID.code"].toLowerCase().includes(action.search || state.search)

I recommend to Get Started with Debugging JavaScript as a generic first step to questions that start with:

Where did I make the mistake...

...before posting to Stack Overflow.

Post a Comment for "Where Did I Make The Mistake Of Changing My Search Filter? And How To Fix It?"