Fix GridTable JSX syntax error in colspan rendering
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 31s
CI / test-go-edu-search (push) Successful in 42s
CI / test-python-klausur (push) Failing after 2m43s
CI / test-python-agent-core (push) Successful in 33s
CI / test-nodejs-website (push) Successful in 39s
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 31s
CI / test-go-edu-search (push) Successful in 42s
CI / test-python-klausur (push) Failing after 2m43s
CI / test-python-agent-core (push) Successful in 33s
CI / test-nodejs-website (push) Successful in 39s
Mismatched closing tags from previous colspan edit caused webpack build failure. Cleaned up spanning cell map() return structure. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -417,7 +417,6 @@ export function GridTable({
|
|||||||
{/* Cells — spanning header or normal columns */}
|
{/* Cells — spanning header or normal columns */}
|
||||||
{isSpanning ? (
|
{isSpanning ? (
|
||||||
<>
|
<>
|
||||||
{/* Render each spanning cell with its colspan */}
|
|
||||||
{zone.cells
|
{zone.cells
|
||||||
.filter((c) => c.row_index === row.index && c.col_type === 'spanning_header')
|
.filter((c) => c.row_index === row.index && c.col_type === 'spanning_header')
|
||||||
.sort((a, b) => a.col_index - b.col_index)
|
.sort((a, b) => a.col_index - b.col_index)
|
||||||
@@ -426,40 +425,31 @@ export function GridTable({
|
|||||||
const cellId = spanCell.cell_id
|
const cellId = spanCell.cell_id
|
||||||
const isSelected = selectedCell === cellId
|
const isSelected = selectedCell === cellId
|
||||||
const cellColor = getCellColor(spanCell)
|
const cellColor = getCellColor(spanCell)
|
||||||
// Grid column: starts at col_index+2 (1-based, +1 for row number column)
|
|
||||||
const gridColStart = spanCell.col_index + 2
|
const gridColStart = spanCell.col_index + 2
|
||||||
const gridColEnd = gridColStart + colspan
|
const gridColEnd = gridColStart + colspan
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
key={cellId}
|
key={cellId}
|
||||||
className="border-b border-r border-gray-200 dark:border-gray-700 bg-blue-50/50 dark:bg-blue-900/10 flex items-center"
|
className={`border-b border-r border-gray-200 dark:border-gray-700 bg-blue-50/50 dark:bg-blue-900/10 flex items-center ${
|
||||||
style={{
|
isSelected ? 'ring-2 ring-teal-500 ring-inset z-10' : ''
|
||||||
gridColumn: `${gridColStart} / ${gridColEnd}`,
|
|
||||||
height: `${rowH}px`,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div className="flex items-center w-full">
|
|
||||||
{cellColor && (
|
|
||||||
<span
|
|
||||||
className="flex-shrink-0 w-1.5 self-stretch rounded-l-sm"
|
|
||||||
style={{ backgroundColor: cellColor }}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
<input
|
|
||||||
id={`cell-${cellId}`}
|
|
||||||
type="text"
|
|
||||||
value={spanCell.text}
|
|
||||||
onChange={(e) => onCellTextChange(cellId, e.target.value)}
|
|
||||||
onFocus={() => onSelectCell(cellId)}
|
|
||||||
onKeyDown={(e) => handleKeyDown(e, cellId)}
|
|
||||||
className={`w-full px-3 py-1 bg-transparent border-0 outline-none text-center ${
|
|
||||||
isSelected ? 'ring-2 ring-teal-500 ring-inset rounded' : ''
|
|
||||||
}`}
|
}`}
|
||||||
style={{ color: cellColor || undefined }}
|
style={{ gridColumn: `${gridColStart} / ${gridColEnd}`, height: `${rowH}px` }}
|
||||||
spellCheck={false}
|
>
|
||||||
/>
|
{cellColor && (
|
||||||
</div>
|
<span className="flex-shrink-0 w-1.5 self-stretch rounded-l-sm" style={{ backgroundColor: cellColor }} />
|
||||||
</div>
|
)}
|
||||||
|
<input
|
||||||
|
id={`cell-${cellId}`}
|
||||||
|
type="text"
|
||||||
|
value={spanCell.text}
|
||||||
|
onChange={(e) => onCellTextChange(cellId, e.target.value)}
|
||||||
|
onFocus={() => onSelectCell(cellId)}
|
||||||
|
onKeyDown={(e) => handleKeyDown(e, cellId)}
|
||||||
|
className="w-full px-3 py-1 bg-transparent border-0 outline-none text-center"
|
||||||
|
style={{ color: cellColor || undefined }}
|
||||||
|
spellCheck={false}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</>
|
</>
|
||||||
|
|||||||
Reference in New Issue
Block a user