pixel-react-excel-sheet 1.0.36 → 1.0.38

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.36",
4
+ "version": "1.0.38",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.esm.js",
7
7
  "types": "lib/index.d.ts",
@@ -143,7 +143,7 @@ export const Controlled: Story = {
143
143
  <Drawer
144
144
  {...defaultArgs}
145
145
  isOpen={showModal}
146
- onCollapes={(expand)=>{}}
146
+ onCollapse={(value) => {}}
147
147
  onClose={() => setShowModal(false)}
148
148
  isFooterRequired={true}
149
149
  _isExpanded={false}
@@ -19,7 +19,7 @@ const Drawer: FC<DrawerProps> = ({
19
19
  leftSecondaryButtonProps = {},
20
20
  showEditButton = false,
21
21
  onEdit = () => {},
22
- onCollapes = () => {},
22
+ onCollapse = () => {},
23
23
  overlay = false,
24
24
  isFooterRequired = true,
25
25
  footerContent = null,
@@ -49,9 +49,10 @@ const Drawer: FC<DrawerProps> = ({
49
49
  handleEsc(onClose);
50
50
 
51
51
  const toggleExpand = () => {
52
- onCollapes(isExpanded)
53
-
54
- setIsExpanded((prev) => !prev);
52
+ setIsExpanded((prev) => {
53
+ onCollapse(!prev);
54
+ return !prev;
55
+ });
55
56
  };
56
57
 
57
58
  const onCancel = () => {
@@ -159,5 +159,5 @@ export interface DrawerProps {
159
159
  */
160
160
  overflow?: string;
161
161
 
162
- onCollapes?:(value:boolean)=>void
162
+ onCollapse?:(value:boolean)=> void
163
163
  }
@@ -422,10 +422,10 @@ const ExcelFile: React.FC<ExcelFileProps> = ({
422
422
 
423
423
  React.useEffect(() => {
424
424
  document.addEventListener('click', handleClickOutside);
425
- document.addEventListener('contextmenu', handleClickOutside);
425
+ // document.addEventListener('contextmenu', handleClickOutside);
426
426
  return () => {
427
427
  document.removeEventListener('click', handleClickOutside);
428
- document.removeEventListener('contextmenu', handleClickOutside);
428
+ // document.removeEventListener('contextmenu', handleClickOutside);
429
429
  };
430
430
  }, [handleClickOutside]);
431
431
 
@@ -118,6 +118,8 @@ export type CellComponentProps<Cell extends CellBase = CellBase> = {
118
118
  setCellData: (cell: Cell) => void;
119
119
 
120
120
  setContextMenu: React.Dispatch<React.SetStateAction<ContextMenuState>>;
121
+ contextClick:(event: React.MouseEvent) => void
122
+
121
123
  };
122
124
 
123
125
  /** Type of the Spreadsheet Cell component */