(columnId: string)
| 79 | 'pointer-events-none cursor-not-allowed opacity-50'; |
| 80 | |
| 81 | function errorFilterOption(columnId: string) { |
| 82 | const columnDefinition = sheetDefinition.columns.find( |
| 83 | (c) => c.id === columnId |
| 84 | ); |
| 85 | |
| 86 | const count = removeDuplicates( |
| 87 | sheetValidationErrors |
| 88 | .filter((error) => error.columnId === columnId) |
| 89 | .map((row) => row.rowIndex) |
| 90 | ).length; |
| 91 | |
| 92 | return { |
| 93 | label: `${columnDefinition?.label || columnId} (${count})`, |
| 94 | value: columnId, |
| 95 | }; |
| 96 | } |
| 97 | |
| 98 | const filterByErrorOptions = removeDuplicates( |
| 99 | sheetValidationErrors.map((error) => error.columnId) |
no test coverage detected