pixel-react-excel-sheet 1.0.35 → 1.0.36

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.35",
4
+ "version": "1.0.36",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.esm.js",
7
7
  "types": "lib/index.d.ts",
@@ -143,6 +143,7 @@ export const Controlled: Story = {
143
143
  <Drawer
144
144
  {...defaultArgs}
145
145
  isOpen={showModal}
146
+ onCollapes={(expand)=>{}}
146
147
  onClose={() => setShowModal(false)}
147
148
  isFooterRequired={true}
148
149
  _isExpanded={false}
@@ -19,6 +19,7 @@ const Drawer: FC<DrawerProps> = ({
19
19
  leftSecondaryButtonProps = {},
20
20
  showEditButton = false,
21
21
  onEdit = () => {},
22
+ onCollapes = () => {},
22
23
  overlay = false,
23
24
  isFooterRequired = true,
24
25
  footerContent = null,
@@ -48,6 +49,8 @@ const Drawer: FC<DrawerProps> = ({
48
49
  handleEsc(onClose);
49
50
 
50
51
  const toggleExpand = () => {
52
+ onCollapes(isExpanded)
53
+
51
54
  setIsExpanded((prev) => !prev);
52
55
  };
53
56
 
@@ -158,4 +158,6 @@ export interface DrawerProps {
158
158
  * Custom overflow for the drawer
159
159
  */
160
160
  overflow?: string;
161
+
162
+ onCollapes?:(value:boolean)=>void
161
163
  }
@@ -422,8 +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
426
  return () => {
426
427
  document.removeEventListener('click', handleClickOutside);
428
+ document.removeEventListener('contextmenu', handleClickOutside);
427
429
  };
428
430
  }, [handleClickOutside]);
429
431
 
@@ -161,8 +161,8 @@ export const Default: Story = {
161
161
  },
162
162
  ],
163
163
  heightType:"page",
164
- contextHeight:0,
165
- contextWidth:0,
164
+ contextHeight:-220,
165
+ contextWidth:-180,
166
166
  sheetHeight:"300px",
167
167
  onSave: () => {},
168
168
  },