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.
9
solved Where did I make the mistake of changing my search filter? And how to fix it?