diff --git a/src/components/PricingView.tsx b/src/components/PricingView.tsx index d4c6572..0da3223 100644 --- a/src/components/PricingView.tsx +++ b/src/components/PricingView.tsx @@ -335,9 +335,15 @@ export function PricingView({ data, headers, onSaveRow, onCaptureState, onEdit, } // Column filters + // Column-specific name filter - Multi-word AND support if (nameColFilter) { - const s = nameColFilter.toLowerCase(); - result = result.filter(r => String(r.row[COLUMNS.ARTICLE_NAME] || '').toLowerCase().includes(s)); + const terms = nameColFilter.toLowerCase().split(/\s+/).filter(Boolean); + if (terms.length > 0) { + result = result.filter(r => { + const name = String(r.row[COLUMNS.ARTICLE_NAME] || '').toLowerCase(); + return terms.every(term => name.includes(term)); + }); + } } if (lineMultiFilter.length > 0) { result = result.filter(r => lineMultiFilter.includes(String(r.row[COLUMNS.LINE] || ''))); @@ -744,7 +750,7 @@ export function PricingView({ data, headers, onSaveRow, onCaptureState, onEdit,