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>
</div> </div>
<TableView <TableView
Products={props.Products.filter((Product) => Products={props.Products.filter(
Product.name.toLowerCase().includes(searchTerm) (Product) =>
Product.name.toLowerCase().includes(searchTerm) ||
Product.date_added.toLowerCase().includes(searchTerm) ||
Product.id.toString().includes(searchTerm)
)} )}
/> />
</div> </div>