Posted 17 December 2024, 5:14 am EST
Hello,
In case of a table created at the corner on a worksheet, its resizing handle doesn’t work. Why?
Here is the code you can reproduce this issue with.
import * as GC from '@mescius/spread-sheets';
import '@mescius/spread-sheets/styles/gc.spread.sheets.excel2016black.css';
import * as React from 'react';
import './App.css';
import Sheets = GC.Spread.Sheets;
export default function App() {
const host = React.useRef<HTMLDivElement|null>(null);
React.useEffect(
() => {
const workbook = new Sheets.Workbook(host.current!);
const activeSheet = workbook.getActiveSheet();
const table1 = activeSheet.tables.add("Table1", 0, 0, 2, 1, Sheets.Tables.TableThemes.medium2);
table1.showResizeHandle(true); // Table1 is NOT resizable by dragging its resize handle.
const table2 = activeSheet.tables.add("Table2", 5, 5, 2, 1, Sheets.Tables.TableThemes.medium2);
table2.showResizeHandle(true); // Table2 is resizable.
return () => workbook.destroy();
},
[]
);
return (
<div ref={host} style={{ height: "90vh", width: "100%" }} />
);
}