Search Filter in React JS - Filter Through Results

  Рет қаралды 155,558

Code Commerce

Code Commerce

Күн бұрын

In this video we build out live search functionality using the filter method, map method, and some react state. We import data from "Mockaroo" which is a pretty cool platform that allows you to draft up mock data for use while building applications. We save the data in to a "data.js" file, but it can simulate getting data back from an API (minus the API call in this case). Thanks for watching!
❤️ Support the Channel
www.buymeacoff...
Instagram 💪
/ fireclint
Github Repo
github.com/fir...
Mock Data
www.mockaroo.com/

Пікірлер: 212
@josephomotade864
@josephomotade864 2 жыл бұрын
You are behind my success with react and being a web developer. Thanks again bro.
@codecommerce
@codecommerce 2 жыл бұрын
Thank you Joseph!!
@santhoshn9769
@santhoshn9769 Жыл бұрын
I feel like very comfortable in search filter. after watching this
@juanxc7
@juanxc7 10 ай бұрын
my bro here just accomplished what I've been struggling with for a whole month in 8 minutes what a pro
@kattagurunadham9425
@kattagurunadham9425 18 күн бұрын
hlo bro iam not getting the searchbar bro
@sebastianlozano7707
@sebastianlozano7707 11 ай бұрын
Literally I watched 5 other videos trying to understand how to render the list filtering the data and they made it look so difficult! You were way clearer my friend! Thanks so much!
@marcelooliveira5034
@marcelooliveira5034 Жыл бұрын
thank you so much for this! really helpful and straightforward. exactly what I needed for a project!
@joshigaming1971
@joshigaming1971 Ай бұрын
Wtf, I Knew Everything, But I couldn't Implement, That's Really Easy,I appreciate Your Work ,🎉 .......Sorry For My Horrible English
@benrenny9828
@benrenny9828 2 жыл бұрын
Hey Colin I'm grateful for your content. Keeps improving my js skills. Please a typescript tutorial will come in handy
@codecommerce
@codecommerce 2 жыл бұрын
Thank you dude! Typescript coming soon
@shahidshafi1227
@shahidshafi1227 2 жыл бұрын
It's much easier than I thought. I thought making a search filter would be complex. Thanks for sharing ❤.
@codecommerce
@codecommerce 2 жыл бұрын
Debunking the complex stuff!! Thank you Shahid!
@coffee80119
@coffee80119 Жыл бұрын
Thanks for the tutorial, short and down to the point. Mockaroo also is a great tool to use i think. Can you do a tutorial on facets searching also in nextjs and firestore?
@matthewtang6806
@matthewtang6806 Жыл бұрын
Thank you for your tutorial! Would be pleased to know if i've seperated the SearchBar & CustomerTable, how can i access the search value of useState in SearchBar.jsx in CustomerTable filter( )?
@anandgomaskar2210
@anandgomaskar2210 Жыл бұрын
thanku so much upload this vidoe it's really hlep me
@nanakwekuotoo1775
@nanakwekuotoo1775 2 жыл бұрын
I don't know how you're being slept on. You're my best react teacher on here💯
@codecommerce
@codecommerce 2 жыл бұрын
Haha thank you Nana!
@robbobpirate3678
@robbobpirate3678 Жыл бұрын
that .includes() is a game changer thanks for the knowledge
@codecommerce
@codecommerce Жыл бұрын
Thank you!
@marcusaureliusregulus2833
@marcusaureliusregulus2833 Жыл бұрын
I am somewhat new and was just wondering, will this not be slow? Or is this the best way how it is done? Apart from server side fetching. Will it be ok with thousands of items?
@FootballForThePeople
@FootballForThePeople 2 жыл бұрын
Hey. Yet again, great video. If I also want to filter by another param such as.. email. Syntax wise, how would you go about this - if we want to filter by not only name but more?
@JasleenKour-ue1ie
@JasleenKour-ue1ie Жыл бұрын
sir if u search with upprcase letters than it won't show anything....so can u help with that
@anoopk.s1255
@anoopk.s1255 Жыл бұрын
I Check so many videos but don't understand.this video so comfortable and understand ❤ thanku
@codecommerce
@codecommerce Жыл бұрын
Thank you- much appreciated!
@vimz92
@vimz92 Жыл бұрын
Bro, Thank you so much. Subscribed
@codecommerce
@codecommerce Жыл бұрын
Thanks Vimal!
@Deqike_Michael2
@Deqike_Michael2 6 ай бұрын
gr8 video, but how about last name, email, phone searching? is it possible to search simultaneously whenever I typed once?
@the-boss-98
@the-boss-98 10 ай бұрын
Every video you make is so helpful
@MuneebUrRehman-fv4qk
@MuneebUrRehman-fv4qk 8 ай бұрын
Thank you so much, this code filtering data from column first, but I want to filter data in both column I mean first name and last name. Please guide me or make a video. Thank You.
@AkyeampongKwekuPrince
@AkyeampongKwekuPrince 4 ай бұрын
How did you convert the json data to normal object data inside the Vs code? struggling with that for days
@Carla-ib4ue
@Carla-ib4ue 2 жыл бұрын
Nice video. Mockaroo seems to be a great tool, gonna make my next project using it! Thanks!
@codecommerce
@codecommerce 2 жыл бұрын
I use it all the time!
@redh4y
@redh4y Жыл бұрын
How can I have the same result considering that my search input is a separated component?
@SyedHazratRazaQuadri
@SyedHazratRazaQuadri 9 ай бұрын
how to handle if my form in different component like input tag search bar is there in navbar component and my data is in product component?
@alensacipi5433
@alensacipi5433 Жыл бұрын
such a great video, thanks for this this was straight forward and just on point really great content, immediately subscribed!! I think at line 39: it is only missing a .toLowerCase() after search so the input is always right => .... .includes(search.toLowerCase( ))
@codecommerce
@codecommerce Жыл бұрын
Thank you Alen
@ShSmith
@ShSmith 2 жыл бұрын
Can you cover how to use this method when working with an API? I want to build a simple dashboard to let some of our users certain class shells we have available. We use a name scheme of Faculty_Template & School_Master - I understand how to get this information but how do I store this on my webpage? I think I could just update the repo with a new list of sections after manually downloading them however it would be nice to make this happen in Realtime. Wouldn't be a lot of data less than .5gb for sure.
@codecommerce
@codecommerce 2 жыл бұрын
It’s basically the same (this is why I stored everything in a separate file to simulate the API response). You can use fetch or a tool like axios to make your api call and then set the response inside of a state variable.
@tomasburian6550
@tomasburian6550 2 жыл бұрын
Good stuff that every beginner should know as searching through data is a vital part of many projects out there. Just to be sure, if I want to search according to various parameters, not just the first name, I'll chain the filter functions like you showed in the Filter Method video?
@jordiverbeek4917
@jordiverbeek4917 6 ай бұрын
i have a question, i want to have my search bar in my header but how do i pass the state from the header to the app.jsx?
@alvinchristianto-p2d
@alvinchristianto-p2d 11 ай бұрын
how about pagination? if we implement pagination, does it only filter the first 'n' data ?
@v.i.n.i.t968
@v.i.n.i.t968 Ай бұрын
i was thinking about create api for search user and use of map() to display it. You have saved our valuable time. Appriciated !!!
@sarkaran
@sarkaran Жыл бұрын
I wonder why after filter I can not use onCLick on filtered items,
@nicmantzivis8978
@nicmantzivis8978 Жыл бұрын
Wow, I wrote so much code to achieve the same result, well done and thank you for this solution 😁
@aasheesh6001
@aasheesh6001 Ай бұрын
Thanks i just forget about filte. thanks bro for the video.
@ahmedoraiby3059
@ahmedoraiby3059 3 ай бұрын
thanks so mush . but how make search relate to all columns not just first name ?
@pnahar0847
@pnahar0847 5 ай бұрын
just wanted to ask im on windows and vscode doesn't autoformats code in js when i save the data what do i need to do?
@srs8074
@srs8074 9 ай бұрын
You are just awesome 😊😊😊
@nimethhr9806
@nimethhr9806 Жыл бұрын
Thank you very much just what i needed
@codecommerce
@codecommerce Жыл бұрын
Thank you!
@respectgmechager8054
@respectgmechager8054 Жыл бұрын
Thanks a lot..u save lot of time ❤❤❤❤..love from India I subscribed u
@-Sigma111
@-Sigma111 Жыл бұрын
thanks, it helped me save more time
@webdev_am
@webdev_am Жыл бұрын
Can you make another additional video for this but with “denouncing” technique?
@moshabbir_hossain
@moshabbir_hossain 3 ай бұрын
That's a great video. It's very helpful and easier way for filtering data from an api.
@swifttechnology3801
@swifttechnology3801 Ай бұрын
Very nice 👍
@mohammadhossein94
@mohammadhossein94 Жыл бұрын
hey thanks for the video ! but what if we want't that filter on email and phoneNumber too ? how should we say that ?
@abdelaliaittalb120
@abdelaliaittalb120 2 ай бұрын
woooow ! genius very how is the Life with u as a genius ??
@scalarcoding
@scalarcoding 11 ай бұрын
Hi, I wanna ask, what if our search bar is in another functional component? do we need to pass the onchange function to parent component and then drill the keyword props to the table component?
@scalarcoding
@scalarcoding 11 ай бұрын
Thanks I found out the answer
@LizyDaRealtor
@LizyDaRealtor 2 ай бұрын
Wow thank you, made my work super easy !!!
@shwetasharma-m2w
@shwetasharma-m2w 5 ай бұрын
Thank you
@chrisdizzle313
@chrisdizzle313 4 ай бұрын
This is EXACTLY what I need to do!
@metehansobaci6938
@metehansobaci6938 8 ай бұрын
gen z be like we can get rid of the gender
@codecommerce
@codecommerce 8 ай бұрын
haha damnit man!!
@rahulsaroj789
@rahulsaroj789 9 ай бұрын
Thanks for the tutorial, and Could you please let me know how to modify it so that it able to make searches based on other parameters as well.
@rahulsaroj789
@rahulsaroj789 9 ай бұрын
got it!, for those who have same question, just replace below code: Object.values(item).join('') with item.first_name then final code would be like: .filter((item) => { return search.toLowerCase() === '' ? item : Object.values(item).join('').toLowerCase().includes(search.toLowerCase()); })
@sidd_shaikh
@sidd_shaikh 9 ай бұрын
Hey great video but what if the data is too large?
@exploreeewithmegha-om6gb
@exploreeewithmegha-om6gb 5 ай бұрын
can we use date filter like from range to range??
@blazerdork3497
@blazerdork3497 2 жыл бұрын
Hi Clint, can it also be done by using the react props? PS: another great video! can't wait for the next one :)
@codecommerce
@codecommerce 2 жыл бұрын
Hi Blazer, I kept everything in the App component, but yes!
@sujaypaul4542
@sujaypaul4542 Жыл бұрын
hmmm..yummy
@Brendan_M_
@Brendan_M_ Жыл бұрын
Thank you, this is so much easier than sending to the backend to search. One note, I noticed it didn't work if there is an uppercase letter in the search bar so I made a small change to: "onChange={(e) => setSearch(e.target.value.toLowerCase())}" so it's now completely case insensitive.
@codecommerce
@codecommerce Жыл бұрын
Awesome! Great way to do it with a small amount of results :)
@mediumsofy
@mediumsofy 3 ай бұрын
Thank you so much man, I was struggling trying to figure out how to implement this feature in my graduation project and your video made it all clear, you're a great teacher!
@Peugeot9X8
@Peugeot9X8 7 ай бұрын
Wow literally took me 3 minutes to apply what shown on the video, great job¡
@anukulghosh6575
@anukulghosh6575 Жыл бұрын
You are awesome, whats your vs code theme name?
@konatesoumahila2806
@konatesoumahila2806 11 ай бұрын
grand merci à vous! +1 abonné😊💯
@Hachirou_Genji
@Hachirou_Genji 11 ай бұрын
thank you so much for this, I'm grateful for you
@selfmadetool
@selfmadetool 6 ай бұрын
Thank you, sir. I was able to incorporate filtering into my project within a few minutes.
@YARAELMASRY
@YARAELMASRY Жыл бұрын
Im getting a bootstrap error
@LuisTal1ercio
@LuisTal1ercio Жыл бұрын
thanks for this video, easy and fast, greetings from Argentina
@thirumalasettysaisatish1043
@thirumalasettysaisatish1043 Жыл бұрын
Thanks for the tutorial, Brilliant Video!
@codecommerce
@codecommerce Жыл бұрын
Thank you sir!
@RealParadox85
@RealParadox85 2 ай бұрын
EXTREMELY clear and easy to follow video and I am someone who has used React since 2018. Well done, sir.
@mdtajulislammt4707
@mdtajulislammt4707 Жыл бұрын
Very thankful video
@thoinguyen3175
@thoinguyen3175 11 ай бұрын
thanks rất nhiều, rất dễ hiểu
@mounir101
@mounir101 10 ай бұрын
Very helpful:) thanks
@jimmyopot1972
@jimmyopot1972 Жыл бұрын
Thanks a lot, indeed benefited. Nairobi, Kenya
@vibhashanaranhinda3774
@vibhashanaranhinda3774 Жыл бұрын
The most simplest and easy to understand tutorial. Keep making awesome tutorials like this.
@LeaNahuelMartinez
@LeaNahuelMartinez 4 ай бұрын
Thanks for this info, still util !
@darkjoyboy04
@darkjoyboy04 Жыл бұрын
Thanks your video made me to understand how filter really works!
@slblackmamba
@slblackmamba 8 ай бұрын
just simple and perfect. thanks
@codecommerce
@codecommerce 8 ай бұрын
You're welcome!
@notappi3982
@notappi3982 Жыл бұрын
thanks that was a great little trick i did had an idead how to do it but u made it simpler for me. thanks a lot LOVE from INDIA
@codecommerce
@codecommerce Жыл бұрын
Awesome man!
@sadimridha5753
@sadimridha5753 10 ай бұрын
Your vedio made my life easy❤
@redh4y
@redh4y Жыл бұрын
Is it possible to do that using useRef rather than useState?
@ozoindaprince
@ozoindaprince Жыл бұрын
we could get rid of the gender 😭
@МурадДжалалов-л6ц
@МурадДжалалов-л6ц 2 жыл бұрын
Bro I really appreciate what you do. can you make video of shopping cart and redux?
@codecommerce
@codecommerce 2 жыл бұрын
Yes!! Coming soon :)
@adityashekharsingh2669
@adityashekharsingh2669 11 ай бұрын
thanks alot broo saved my ass
@duytien69
@duytien69 2 жыл бұрын
Hey Bro, thanks a lot, I hope bro will release a video about Cart (Commerce) in ReactJS
@codecommerce
@codecommerce 2 жыл бұрын
Lots of content in the pipeline! It just takes a little time. :)
@anirudhhosur3827
@anirudhhosur3827 Жыл бұрын
Thank you so muchhhhhh
@bibakgh6810
@bibakgh6810 Жыл бұрын
very good . thank you
@uniquedivya113
@uniquedivya113 Жыл бұрын
Really ur great.. i tried with many videos but ur videos awesome man
@codecommerce
@codecommerce Жыл бұрын
Thank you my friend!
@UddhikaIshara
@UddhikaIshara Жыл бұрын
Thank you very much
@shoaibrehman1348
@shoaibrehman1348 2 жыл бұрын
Sir i am first liker of your video. and i also watch every video of yours ... plz create one video on redux-toolkit with async thunk ... Thank you ....
@codecommerce
@codecommerce 2 жыл бұрын
You got it! Thank you sir
@shoaibrehman1348
@shoaibrehman1348 2 жыл бұрын
@@codecommerce I will be waiting ....
@itbeat7899
@itbeat7899 Жыл бұрын
this just solved the problem I had for the last 8 months. Thank you so so much! you dont know how much I appreciate this help
@kevinleon4621
@kevinleon4621 Жыл бұрын
Thanks man this video was useful!
@weimardoge
@weimardoge Жыл бұрын
Great! Thats like and a "subscribe"
@codecommerce
@codecommerce Жыл бұрын
Thanks!
@judoScott
@judoScott 7 ай бұрын
That was great! Thank you so much
@mostafaekbal7093
@mostafaekbal7093 2 жыл бұрын
Thank you so much man, I've learned a lot from this video.
@ThiagoSilva-jn6ov
@ThiagoSilva-jn6ov 3 ай бұрын
You are amazing
@mr.pjarts9142
@mr.pjarts9142 11 күн бұрын
Thank you ❤❤
@eliucastillo6976
@eliucastillo6976 10 ай бұрын
just what i was looking for, thank you
@durotemy8410
@durotemy8410 Жыл бұрын
I have a question
@Luunaquedateluuna
@Luunaquedateluuna 20 күн бұрын
Oh God, it was so simple 🥲 Thanks!!!
@waheedulislam7240
@waheedulislam7240 3 ай бұрын
Thank u bro🥰
@Berlin-v6d
@Berlin-v6d 10 ай бұрын
Very good Explanation! 👍
@mpowereer6992
@mpowereer6992 2 жыл бұрын
great video, can you make tutorial with live drag and drop with updating index data in firestore?
@codecommerce
@codecommerce 2 жыл бұрын
Great idea, thank you.
@mohammedadam5711
@mohammedadam5711 Жыл бұрын
Thank you so much
Most Beginner React Developers Do This Wrong
13:47
Web Dev Simplified
Рет қаралды 233 М.
Make a Search Bar with React (with API Calls) | Beginners Tutorial
27:49
💩Поу и Поулина ☠️МОЧАТ 😖Хмурых Тварей?!
00:34
Ной Анимация
Рет қаралды 2 МЛН
Which One Is The Best - From Small To Giant #katebrush #shorts
00:17
Spongebob ate Patrick 😱 #meme #spongebob #gmod
00:15
Mr. LoLo
Рет қаралды 19 МЛН
React Search Filter Tutorial Beginner to Advanced
26:50
Lama Dev
Рет қаралды 263 М.
Build Search Filter with React | ReactJS Search Bar
11:39
Eazy2Code
Рет қаралды 35 М.
Master React JS in easy way
12:18
Nova Designs
Рет қаралды 96 М.
Don't Use Websockets (Until You Try This…)
6:46
Code With Ryan
Рет қаралды 305 М.
Search Bar with suggestions and filter in react for beginners
10:15
React with Masoud
Рет қаралды 89 М.
Search Filter in React JS with Search Bar in React Example
19:49
💩Поу и Поулина ☠️МОЧАТ 😖Хмурых Тварей?!
00:34
Ной Анимация
Рет қаралды 2 МЛН