Skip to content

Commit

Permalink
fix: set width and height at left top
Browse files Browse the repository at this point in the history
  • Loading branch information
righ committed Oct 28, 2024
1 parent 6dac222 commit 6e438e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Tabular.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const Tabular = ({ tableRef }: Props) => {
const [refs, setRefs] = React.useState<RefPaletteType>({});
const [, { externalRefs = {}, setExternalRefs }] = useSheetContext();
const { store, dispatch } = React.useContext(Context);
const { sheetHeight, sheetWidth, table, tableInitialized, gridOuterRef, sheetRef } = store;
const { sheetHeight, sheetWidth, table, tableInitialized, gridOuterRef, sheetRef, headerWidth, headerHeight } = store;

const { editingCell, inputting } = store;

Expand Down Expand Up @@ -127,7 +127,7 @@ export const Tabular = ({ tableRef }: Props) => {
<tr>
<th
className="gs-header gs-header-left gs-header-top gs-header-left-top"
style={{ position: 'sticky' }}
style={{ position: 'sticky', width: headerWidth, height: headerHeight }}
onClick={() => {
dispatch(choose({ y: -1, x: -1 }));
window.setTimeout(() => {
Expand Down

0 comments on commit 6e438e5

Please sign in to comment.