dream-num / dream-num/luckysheet-react

How to disable Columns and Rows in Lucksheet

Open
#5 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
80
Forks
33
PR merge metrics
No merged PRs in 30d

Description

I try to disabled headers row in lucky sheet but I don't get any soln. of it. I am using ReactJs.
Plese Help.

`import { useEffect, useRef } from 'react';

export const CaptableGrid = ({ isInvestor = false }) => {

const LUCKYDATA = [
[
'First Name',
'Last Name',
'Country Code',
'Mobile',
'Email',
],
['', '', '', '', '', '', '', ''],
];

const tableArray: any = [];
(isInvestor ? LUCKYDATA?.forEach(
(rows: any, rowIndex: any) => {
rows.forEach((row: any, colIndex: any) => {
const cellObj = {
r: rowIndex,
c: colIndex,
v: {
ct: { fa: 'General', t: 'g' },
m: row,
v: row,
},
};
tableArray.push(cellObj);
});
}
);
const luckysheet = useRef(null);

useEffect(() => {
luckysheet.current = (window as any)?.luckysheet;
(luckysheet as any).current.create({
container: 'luckysheet',
showtoolbar: false,
showsheetbar: false,
showinfobar: false,
showstatisticBar: false,
sheetFormulaBar: false,
defaultColWidth: 144,
defaultRowHeight: 32,
row: 10,
data: [
{
celldata: tableArray,
},
],
hook: {
cellUpdated: () => {
return true;
},
},
});
setTimeout(() => {
(luckysheet?.current as any)?.setHorizontalFrozen(false);
}, 500);
// eslint-disable-next-line
}, []);

return (


);
};
`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.