()
| 48 | } |
| 49 | |
| 50 | function renderTables() { |
| 51 | const tables = categories.map(cat => { |
| 52 | let catItems = items.filter(i => i.categoryId === cat.id); |
| 53 | catItems = searchItems(catItems, filterText); |
| 54 | |
| 55 | if (!catItems.length) return null; |
| 56 | return <Table key={cat.id} category={cat} items={catItems} fetchItems={fetchItems} updateItem={updateItem}/> |
| 57 | }); |
| 58 | |
| 59 | return <div style={{ minWidth: '100%', overflowX: "scroll" }}>{tables}</div>; |
| 60 | } |
| 61 | |
| 62 | const renderEmptyList = () => ( |
| 63 | <MessageArea> |
no test coverage detected