подстветка ячеек
This commit is contained in:
@@ -14,6 +14,7 @@ export const Spreadsheet = ({
|
||||
activeSheet,
|
||||
isEditing,
|
||||
editingValue,
|
||||
highlightedCells,
|
||||
handleCellClick,
|
||||
handleCellDoubleClick,
|
||||
handleCellChange,
|
||||
@@ -41,6 +42,7 @@ export const Spreadsheet = ({
|
||||
editingValue,
|
||||
cachedData,
|
||||
mergedCells,
|
||||
highlightedCells,
|
||||
handleCellClick,
|
||||
handleCellDoubleClick,
|
||||
handleCellChange,
|
||||
@@ -78,7 +80,9 @@ export const Spreadsheet = ({
|
||||
onClick={() => setActiveSheet(sheetType)}
|
||||
>
|
||||
<div
|
||||
ref={el => (containerRefs.current[sheetType] = el)}
|
||||
ref={el => {
|
||||
containerRefs.current[sheetType] = el
|
||||
}}
|
||||
className="flex h-full flex-col overflow-hidden border bg-card shadow-sm"
|
||||
onKeyDown={handleKeyDown}
|
||||
tabIndex={0}
|
||||
@@ -102,7 +106,9 @@ export const Spreadsheet = ({
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
ref={el => (rowHeaderRefs.current[sheetType] = el)}
|
||||
ref={el => {
|
||||
rowHeaderRefs.current[sheetType] = el
|
||||
}}
|
||||
className="overflow-y-hidden"
|
||||
style={{ height: gridSize.height }}
|
||||
>
|
||||
@@ -126,7 +132,9 @@ export const Spreadsheet = ({
|
||||
<div className="flex-1 overflow-hidden">
|
||||
{/* Column Headers */}
|
||||
<div
|
||||
ref={el => (headerRefs.current[sheetType] = el)}
|
||||
ref={el => {
|
||||
headerRefs.current[sheetType] = el
|
||||
}}
|
||||
className="column-headers overflow-x-hidden"
|
||||
>
|
||||
<div className="flex">
|
||||
@@ -171,9 +179,9 @@ export const Spreadsheet = ({
|
||||
{/* Grid */}
|
||||
<div className="min-h-0 flex-1">
|
||||
<VariableSizeGrid
|
||||
ref={(el: VariableSizeGrid | null) =>
|
||||
(gridRefs.current[sheetType] = el)
|
||||
}
|
||||
ref={(el: VariableSizeGrid | null) => {
|
||||
gridRefs.current[sheetType] = el
|
||||
}}
|
||||
columnCount={COL_COUNT}
|
||||
rowCount={ROW_COUNT}
|
||||
columnWidth={(index: number) => widths[index]}
|
||||
|
||||
Reference in New Issue
Block a user