johnbabu021 / shopping-cart

React hooks Firebase tailwindcss
https://e-commerce-app-ql089sf70-johnbabu021.vercel.app/
MIT License
6 stars 10 forks source link

adding proper search page #14

Open johnbabu021 opened 3 years ago

swag1223 commented 3 years ago

can you please describe your requirement for this issue in more detail

johnbabu021 commented 3 years ago

okay we have an array that contains all the data from database just add the filter on that array by change on that search input search string and name of shopping elements to upper case the find indexof for the shopping element if the search term is also there you can return >0 so by default index of return 0 if you search doesn't contains anything it will return -1 if they find match it will be it's index