pixel-react-excel-sheet 1.0.15 → 1.0.16

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pixel-react-excel-sheet",
3
3
  "description": "Great for pixel-perfect, design-focused components in React",
4
- "version": "1.0.15",
4
+ "version": "1.0.16",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.esm.js",
7
7
  "types": "lib/index.d.ts",
@@ -7,7 +7,7 @@
7
7
  min-height: 32px;
8
8
  min-width: 111px;
9
9
  white-space: nowrap;
10
- z-index: 200;
10
+ z-index: 2000;
11
11
 
12
12
  .ff-excel-menu-options {
13
13
  color: var(--text-color);
@@ -430,8 +430,8 @@ const ExcelFile: React.FC<ExcelFileProps> = ({
430
430
  setContextMenu({
431
431
  open: true,
432
432
  position: {
433
- x: event.pageX - 50,
434
- y: event.pageY - 350,
433
+ x: event.pageX - 0,
434
+ y: event.pageY - 50,
435
435
  },
436
436
  options: options,
437
437
  });
@@ -91,7 +91,14 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
91
91
  value: string;
92
92
  }>({
93
93
  label: 'Times New Roman',
94
- value: '"Times New Roman"',
94
+ value: 'Times New Roman',
95
+ });
96
+ const [selectedFontSize, setSelectedFontSize] = useState<{
97
+ label: string;
98
+ value: string;
99
+ }>({
100
+ label: '11',
101
+ value: '11',
95
102
  });
96
103
  const [colorContainer, setColorPicker] = useState<ColorContainer>({
97
104
  color: 'var(--error-light)',
@@ -219,9 +226,10 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
219
226
  <div className="ff-excel-toolbar-font-family">
220
227
  <Select
221
228
  showLabel={false}
222
- optionZIndex={10000}
229
+ optionZIndex={1000}
223
230
  onChange={(e) => {
224
- setSelectedFontFamily({ label: e.label, value: e.value });
231
+ console.log(e);
232
+ setSelectedFontFamily({ label: e.label, value: e.label });
225
233
  setFontFamily(data, e.label);
226
234
  }}
227
235
  required={false}
@@ -234,14 +242,14 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
234
242
  <div className="ff-excel-toolbar-font-size">
235
243
  <Select
236
244
  showLabel={false}
237
- optionZIndex={5000}
245
+ optionZIndex={1000}
238
246
  required={false}
239
- onChange={(e) => setFontSize(data, e.value)}
240
- optionsList={fontSize}
241
- selectedOption={{
242
- label: '11',
243
- value: '11',
247
+ onChange={(e) => {
248
+ setSelectedFontSize({ label: e.label, value: e.value });
249
+ setFontSize(data, e.value);
244
250
  }}
251
+ optionsList={fontSize}
252
+ selectedOption={selectedFontSize}
245
253
  />
246
254
  </div>
247
255
  </Tooltip>
@@ -310,7 +318,7 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
310
318
  />
311
319
  <MenuOption
312
320
  iconName="arrow_down"
313
- zIndex={2000}
321
+ zIndex={1000}
314
322
  iconSize={12}
315
323
  options={underlineTypeIcon}
316
324
  tooltipPlacement="top"
@@ -387,7 +395,7 @@ const ExcelToolBar: React.FC<ExcelToolBarProps> = ({
387
395
  <MenuOption
388
396
  iconName="arrow_down"
389
397
  iconSize={12}
390
- zIndex={5000}
398
+ zIndex={1000}
391
399
  options={borderTypeIcon}
392
400
  tooltipPlacement="top"
393
401
  variant="light"