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.
@@ -154,5 +154,5 @@ export interface DrawerProps {
154
154
  * Custom overflow for the drawer
155
155
  */
156
156
  overflow?: string;
157
- onCollapes?: (value: boolean) => void;
157
+ onCollapse?: (value: boolean) => void;
158
158
  }
@@ -103,6 +103,7 @@ export type CellComponentProps<Cell extends CellBase = CellBase> = {
103
103
  /** Set data of the cell */
104
104
  setCellData: (cell: Cell) => void;
105
105
  setContextMenu: React.Dispatch<React.SetStateAction<ContextMenuState>>;
106
+ contextClick: (event: React.MouseEvent) => void;
106
107
  };
107
108
  /** Type of the Spreadsheet Cell component */
108
109
  export type CellComponent<Cell extends CellBase = CellBase> = React.ComponentType<CellComponentProps<Cell>>;
package/lib/index.d.ts CHANGED
@@ -303,7 +303,7 @@ interface DrawerProps {
303
303
  * Custom overflow for the drawer
304
304
  */
305
305
  overflow?: string;
306
- onCollapes?: (value: boolean) => void;
306
+ onCollapse?: (value: boolean) => void;
307
307
  }
308
308
 
309
309
  declare const Drawer: FC<DrawerProps>;
package/lib/index.esm.js CHANGED
@@ -1102,7 +1102,7 @@ const Drawer = ({
1102
1102
  leftSecondaryButtonProps = {},
1103
1103
  showEditButton = false,
1104
1104
  onEdit = () => {},
1105
- onCollapes = () => {},
1105
+ onCollapse = () => {},
1106
1106
  overlay = false,
1107
1107
  isFooterRequired = true,
1108
1108
  footerContent = null,
@@ -1129,8 +1129,10 @@ const Drawer = ({
1129
1129
  const handleEsc = useEscapeKey('Escape');
1130
1130
  handleEsc(onClose);
1131
1131
  const toggleExpand = () => {
1132
- onCollapes(isExpanded);
1133
- setIsExpanded(prev => !prev);
1132
+ setIsExpanded(prev => {
1133
+ onCollapse(!prev);
1134
+ return !prev;
1135
+ });
1134
1136
  };
1135
1137
  const onCancel = () => {
1136
1138
  if (secondaryButtonProps.onClick) {
@@ -33491,10 +33493,10 @@ const ExcelFile = ({
33491
33493
  }, [contextMenu.open]);
33492
33494
  React__default.useEffect(() => {
33493
33495
  document.addEventListener('click', handleClickOutside);
33494
- document.addEventListener('contextmenu', handleClickOutside);
33496
+ // document.addEventListener('contextmenu', handleClickOutside);
33495
33497
  return () => {
33496
33498
  document.removeEventListener('click', handleClickOutside);
33497
- document.removeEventListener('contextmenu', handleClickOutside);
33499
+ // document.removeEventListener('contextmenu', handleClickOutside);
33498
33500
  };
33499
33501
  }, [handleClickOutside]);
33500
33502
  const contextClick = event => {