Show empty results message on product filters
This commit is contained in:
1 parent
4e785a1680
commit
141c2af06f
2 files changed
+53
-9
No files matched your search
@@ -352,15 +352,21 @@ export const ManageProductsScreen = () => {
|
||||
Save Product
|
||||
</Button>
|
||||
</Stack>
|
||||
{sortedFiltered.map((product) => (
|
||||
<ProductRow
|
||||
key={product.id}
|
||||
product={product}
|
||||
categories={categoryOptions}
|
||||
onSave={updateProduct}
|
||||
onDelete={deleteProduct}
|
||||
/>
|
||||
))}
|
||||
{sortedFiltered.length === 0 ? (
|
||||
<Typography variant="body2" color="text.secondary">
|
||||
No products match your search and category filter.
|
||||
</Typography>
|
||||
) : (
|
||||
sortedFiltered.map((product) => (
|
||||
<ProductRow
|
||||
key={product.id}
|
||||
product={product}
|
||||
categories={categoryOptions}
|
||||
onSave={updateProduct}
|
||||
onDelete={deleteProduct}
|
||||
/>
|
||||
))
|
||||
)}
|
||||
</Stack>
|
||||
<Dialog open={scannerOpen} onClose={() => setScannerOpen(false)} fullWidth>
|
||||
<DialogTitle>Scan Barcode</DialogTitle>
|
||||
|
||||
Reference in new issue
Block a user