pixel-react-excel-sheet 1.0.14 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/Excel/ExcelFile/ExcelFile.d.ts +2 -0
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.d.ts +2 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.esm.js +11 -1
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +11 -1
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Excel/ExcelFile/ExcelFile.tsx +6 -1
- package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.scss +0 -1
- package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.tsx +4 -1
- package/src/components/Excel/ExcelFile.stories.tsx +1 -0
- package/src/components/Excel/ExcelToolBar/ExcelToolBar.tsx +4 -0
package/package.json
CHANGED
|
@@ -33,10 +33,14 @@ interface ExcelFileProps {
|
|
|
33
33
|
|
|
34
34
|
/** Callback function to save the Excel data */
|
|
35
35
|
onSave?: (saveData: any) => void;
|
|
36
|
+
|
|
37
|
+
/** Set your dynamic sheet Height*/
|
|
38
|
+
sheetHeight?: string;
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
const ExcelFile: React.FC<ExcelFileProps> = ({
|
|
39
42
|
excelData,
|
|
43
|
+
sheetHeight = '100%',
|
|
40
44
|
onSave = (saveData) => {
|
|
41
45
|
saveData();
|
|
42
46
|
},
|
|
@@ -440,6 +444,7 @@ const ExcelFile: React.FC<ExcelFileProps> = ({
|
|
|
440
444
|
{contextMenu.open && <ExcelContextMenu contextMenu={contextMenu} />}
|
|
441
445
|
<div ref={sheetRef} className="ff-excel-sheet">
|
|
442
446
|
<Spreadsheet
|
|
447
|
+
sheetHeight={sheetHeight}
|
|
443
448
|
setContextMenu={setContextMenu}
|
|
444
449
|
data={selectedSheetData}
|
|
445
450
|
onEvaluatedDataChange={onEvaluateChange}
|
|
@@ -500,7 +505,7 @@ const ExcelFile: React.FC<ExcelFileProps> = ({
|
|
|
500
505
|
<Toastify />
|
|
501
506
|
</div>
|
|
502
507
|
)}
|
|
503
|
-
|
|
508
|
+
</>
|
|
504
509
|
);
|
|
505
510
|
};
|
|
506
511
|
|
|
@@ -98,6 +98,8 @@ export type Props<CellType extends Types.CellBase> = {
|
|
|
98
98
|
/** Callback called when the Spreadsheet's evaluated data changes. */
|
|
99
99
|
onEvaluatedDataChange?: (data: Matrix.Matrix<CellType>) => void;
|
|
100
100
|
setContextMenu: React.Dispatch<React.SetStateAction<Types.ContextMenuState>>;
|
|
101
|
+
/** Set your dynamic sheet Height*/
|
|
102
|
+
sheetHeight: string;
|
|
101
103
|
};
|
|
102
104
|
|
|
103
105
|
/**
|
|
@@ -113,6 +115,7 @@ const Spreadsheet = <CellType extends Types.CellBase>(
|
|
|
113
115
|
onKeyDown,
|
|
114
116
|
Table = DefaultTable,
|
|
115
117
|
Row = DefaultRow,
|
|
118
|
+
sheetHeight,
|
|
116
119
|
HeaderRow = DefaultHeaderRow,
|
|
117
120
|
DataEditor = DefaultDataEditor,
|
|
118
121
|
DataViewer = DefaultDataViewer,
|
|
@@ -457,9 +460,9 @@ const Spreadsheet = <CellType extends Types.CellBase>(
|
|
|
457
460
|
setFormatePainter={setFormatePainter}
|
|
458
461
|
/>
|
|
459
462
|
</div>
|
|
460
|
-
|
|
461
463
|
<div
|
|
462
464
|
ref={rootRef}
|
|
465
|
+
style={{height:sheetHeight}}
|
|
463
466
|
className={classNames('ff-spreadsheet', className)}
|
|
464
467
|
onKeyDown={handleKeyDown}
|
|
465
468
|
onMouseMove={handleMouseMove}
|
|
@@ -219,6 +219,7 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
|
|
|
219
219
|
<div className="ff-excel-toolbar-font-family">
|
|
220
220
|
<Select
|
|
221
221
|
showLabel={false}
|
|
222
|
+
optionZIndex={10000}
|
|
222
223
|
onChange={(e) => {
|
|
223
224
|
setSelectedFontFamily({ label: e.label, value: e.value });
|
|
224
225
|
setFontFamily(data, e.label);
|
|
@@ -233,6 +234,7 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
|
|
|
233
234
|
<div className="ff-excel-toolbar-font-size">
|
|
234
235
|
<Select
|
|
235
236
|
showLabel={false}
|
|
237
|
+
optionZIndex={5000}
|
|
236
238
|
required={false}
|
|
237
239
|
onChange={(e) => setFontSize(data, e.value)}
|
|
238
240
|
optionsList={fontSize}
|
|
@@ -308,6 +310,7 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
|
|
|
308
310
|
/>
|
|
309
311
|
<MenuOption
|
|
310
312
|
iconName="arrow_down"
|
|
313
|
+
zIndex={2000}
|
|
311
314
|
iconSize={12}
|
|
312
315
|
options={underlineTypeIcon}
|
|
313
316
|
tooltipPlacement="top"
|
|
@@ -384,6 +387,7 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
|
|
|
384
387
|
<MenuOption
|
|
385
388
|
iconName="arrow_down"
|
|
386
389
|
iconSize={12}
|
|
390
|
+
zIndex={5000}
|
|
387
391
|
options={borderTypeIcon}
|
|
388
392
|
tooltipPlacement="top"
|
|
389
393
|
variant="light"
|