I am generating Handsontable
instance on button click and placing it in a <div />
with ref.current
.
I am applying merging and border design dynamically but when I drag mouse over Column headers
, I get the warning :
Uncaught TypeError: Cannot read properties of null (reading ‘querySelector’)
at overlayContainsElement (element.mjs:233:1)
at MasterTable.getCoords (table.mjs:775:1)
at ManualColumnResize.setupHandlePosition (manualColumnResize.mjs:287:1)
at ManualColumnResize.onMouseOver (manualColumnResize.mjs:455:1)
at HTMLDivElement. (manualColumnResize.mjs:646:1)
at HTMLDivElement.callbackProxy (eventManager.mjs:61:1)
this is how I am creating Handsontable instance
new Handsontable(varianceDivRef.current[index], {
width: “100%”,
height: “auto”,
stretchH: “all”,
data: varianceData[index].grid_data_full,
fixedColumnsLeft: 7,
rowHeaders: true,
colHeaders: true,
manualColumnResize: true,
manualRowMove: true,
mergeCells: mergeVariance,
hiddenColumns: {
columns: [0, 1],
},
colWidths: (index: number) => {
return index === 6 || index === 3 ? 100 : index === 2 ? 200 : 70;
},
cells: () => {
var cellProperties: CellMeta = {
readOnly: true,
};
cellProperties.renderer = cellFormatingRenderer; // uses lookup map
return cellProperties;
},
customBorders: borderVariance,
licenseKey: “non-commercial-and-evaluation”, // for non-commercial use only
});