You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@mongodb-js/compass-context-menu

Package Overview
Dependencies
Maintainers
25
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mongodb-js/compass-context-menu - npm Package Compare versions

Comparing version

to
0.1.1

3

dist/context-menu-provider.d.ts
import React from 'react';
import type { ContextMenuContextType, ContextMenuState } from './types';
export declare const ContextMenuContext: React.Context<ContextMenuContextType | null>;
export declare function ContextMenuProvider({ children, menuWrapper, }: {
export declare function ContextMenuProvider({ disabled, children, menuWrapper, }: {
disabled?: boolean;
children: React.ReactNode;

@@ -6,0 +7,0 @@ menuWrapper: React.ComponentType<{

@@ -30,3 +30,3 @@ "use strict";

exports.ContextMenuContext = (0, react_1.createContext)(null);
function ContextMenuProvider({ children, menuWrapper, }) {
function ContextMenuProvider({ disabled = false, children, menuWrapper, }) {
// Check if there's already a parent context menu provider

@@ -47,3 +47,3 @@ const parentContext = (0, react_1.useContext)(exports.ContextMenuContext);

// Don't set up event listeners if we have a parent context
if (parentContext)
if (parentContext || disabled)
return;

@@ -72,3 +72,3 @@ function handleContextMenu(event) {

};
}, [handleClosingEvent, parentContext]);
}, [disabled, handleClosingEvent, parentContext]);
const value = (0, react_1.useMemo)(() => ({

@@ -75,0 +75,0 @@ close,

@@ -16,3 +16,3 @@ {

"homepage": "https://github.com/mongodb-js/compass",
"version": "0.1.0",
"version": "0.1.1",
"repository": {

@@ -74,3 +74,3 @@ "type": "git",

},
"gitHead": "529958272c8600ca6a938f22a4e9beb56b52da4b"
"gitHead": "b7caa2e7e2c72d359fb70cb50045f64dc3a73ff7"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet