Polished products page search

This commit is contained in:
keannu125 2023-03-11 00:00:23 +08:00
parent 7dc3729bec
commit 435a576c15

View file

@ -54,8 +54,11 @@ export default function ViewManager(props: ProductList) {
</div>
</div>
<TableView
Products={props.Products.filter((Product) =>
Product.name.toLowerCase().includes(searchTerm)
Products={props.Products.filter(
(Product) =>
Product.name.toLowerCase().includes(searchTerm) ||
Product.date_added.toLowerCase().includes(searchTerm) ||
Product.id.toString().includes(searchTerm)
)}
/>
</div>