Repository: salute-developers/plasma
Pull request #1791: PLASMA-4491: open Dropdown by right click
Author: login: vadim-kudr
Created: 2025-02-23T16:20:59Z | Merged: 2025-03-12T14:49:05Z

## Core

### Dropdown

- добавлено свойство openByRightClick для открытия по правому клику

### What/why changed

расширен функционал

<!-- GITHUB_RELEASE PR BODY: canary-version -->
<details>
  <summary>📦 Published PR as canary version: <code>Canary Versions</code></summary>
  <br />

  :sparkles: Test out this PR locally via:
  
  ```bash
  npm install @salutejs/plasma-asdk@0.288.0-canary.1791.13484791679.0
  npm install @salutejs/plasma-b2c@1.530.0-canary.1791.13484791679.0
  npm install @salutejs/plasma-giga@0.257.0-canary.1791.13484791679.0
  npm install @salutejs/plasma-new-hope@0.276.0-canary.1791.13484791679.0
  npm install @salutejs/plasma-web@1.532.0-canary.1791.13484791679.0
  npm install @salutejs/sdds-cs@0.265.0-canary.1791.13484791679.0
  npm install @salutejs/sdds-dfa@0.260.0-canary.1791.13484791679.0
  npm install @salutejs/sdds-finportal@0.253.0-canary.1791.13484791679.0
  npm install @salutejs/sdds-insol@0.257.0-canary.1791.13484791679.0
  npm install @salutejs/sdds-serv@0.261.0-canary.1791.13484791679.0
  # or 
  yarn add @salutejs/plasma-asdk@0.288.0-canary.1791.13484791679.0
  yarn add @salutejs/plasma-b2c@1.530.0-canary.1791.13484791679.0
  yarn add @salutejs/plasma-giga@0.257.0-canary.1791.13484791679.0
  yarn add @salutejs/plasma-new-hope@0.276.0-canary.1791.13484791679.0
  yarn add @salutejs/plasma-web@1.532.0-canary.1791.13484791679.0
  yarn add @salutejs/sdds-cs@0.265.0-canary.1791.13484791679.0
  yarn add @salutejs/sdds-dfa@0.260.0-canary.1791.13484791679.0
  yarn add @salutejs/sdds-finportal@0.253.0-canary.1791.13484791679.0
  yarn add @salutejs/sdds-insol@0.257.0-canary.1791.13484791679.0
  yarn add @salutejs/sdds-serv@0.261.0-canary.1791.13484791679.0
  ```
</details>
<!-- GITHUB_RELEASE PR BODY: canary-version -->



Diff:
diff --git a/packages/plasma-b2c/api/plasma-b2c.api.md b/packages/plasma-b2c/api/plasma-b2c.api.md
index d38f1033260..074c3591832 100644
--- a/packages/plasma-b2c/api/plasma-b2c.api.md
+++ b/packages/plasma-b2c/api/plasma-b2c.api.md
@@ -1937,6 +1937,7 @@ default: PolymorphicClassName;
     onHover?: ((index: number) => void) | undefined;
     onItemSelect?: ((item: DropdownItemOption, event: React_2.SyntheticEvent<Element, Event>) => void) | undefined;
     trigger?: DropdownTrigger | undefined;
+    openByRightClick?: boolean | undefined;
     placement?: DropdownPlacement | undefined;
     offset?: [number, number] | undefined;
     listWidth?: Property.Width<string | number> | undefined;
diff --git a/packages/plasma-b2c/src/components/Dropdown/Dropdown.stories.tsx b/packages/plasma-b2c/src/components/Dropdown/Dropdown.stories.tsx
index b3366d7bcbd..bbd6c3ff510 100644
--- a/packages/plasma-b2c/src/components/Dropdown/Dropdown.stories.tsx
+++ b/packages/plasma-b2c/src/components/Dropdown/Dropdown.stories.tsx
@@ -33,6 +33,11 @@ const meta: Meta<DropdownProps> = {
                 type: 'select',
             },
         },
+        openByRightClick: {
+            control: {
+                type: 'boolean',
+            },
+        },
         size: {
             options: size,
             control: {
@@ -62,6 +67,7 @@ const meta: Meta<DropdownProps> = {
         variant: 'normal',
         placement: 'bottom-start',
         trigger: 'click',
+        openByRightClick: false,
         offset: [0, 0],
         listWidth: '300px',
         hasArrow: true,
diff --git a/packages/plasma-giga/api/plasma-giga.api.md b/packages/plasma-giga/api/plasma-giga.api.md
index 53bb2aee7de..6e9bd6e9d0d 100644
--- a/packages/plasma-giga/api/plasma-giga.api.md
+++ b/packages/plasma-giga/api/plasma-giga.api.md
@@ -1649,6 +1649,7 @@ default: PolymorphicClassName;
     onHover?: ((index: number) => void) | undefined;
     onItemSelect?: ((item: DropdownItemOption, event: React_2.SyntheticEvent<Element, Event>) => void) | undefined;
     trigger?: DropdownTrigger | undefined;
+    openByRightClick?: boolean | undefined;
     placement?: DropdownPlacement | undefined;
     offset?: [number, number] | undefined;
     listWidth?: Property.Width<string | number> | undefined;
diff --git a/packages/plasma-giga/src/components/Dropdown/Dropdown.stories.tsx b/packages/plasma-giga/src/components/Dropdown/Dropdown.stories.tsx
index 23c8bdb9810..cf51a2a4f24 100644
--- a/packages/plasma-giga/src/components/Dropdown/Dropdown.stories.tsx
+++ b/packages/plasma-giga/src/components/Dropdown/Dropdown.stories.tsx
@@ -33,6 +33,11 @@ const meta: Meta<DropdownProps> = {
                 type: 'select',
             },
         },
+        openByRightClick: {
+            control: {
+                type: 'boolean',
+            },
+        },
         size: {
             options: size,
             control: {
@@ -62,6 +67,7 @@ const meta: Meta<DropdownProps> = {
         variant: 'normal',
         placement: 'bottom-start',
         trigger: 'click',
+        openByRightClick: false,
         offset: [0, 0],
         listWidth: '300px',
         hasArrow: true,
diff --git a/packages/plasma-new-hope/src/components/Dropdown/Dropdown.tsx b/packages/plasma-new-hope/src/components/Dropdown/Dropdown.tsx
index 5feb8facdf0..fa74dee5d9a 100644
--- a/packages/plasma-new-hope/src/components/Dropdown/Dropdown.tsx
+++ b/packages/plasma-new-hope/src/components/Dropdown/Dropdown.tsx
@@ -1,4 +1,4 @@
-import React, { forwardRef, useReducer, useRef } from 'react';
+import React, { forwardRef, useCallback, useReducer, useRef } from 'react';
 import { safeUseId } from '@salutejs/plasma-core';
 
 import { RootProps } from '../../engines';
@@ -44,6 +44,7 @@ export const dropdownRoot = (Root: RootProps<HTMLDivElement, Omit<DropdownProps,
                 onItemSelect,
                 onItemClick,
                 trigger = 'click',
+                openByRightClick = false,
                 variant = 'normal',
                 hasArrow = true,
                 alwaysOpened = false,
@@ -59,6 +60,8 @@ export const dropdownRoot = (Root: RootProps<HTMLDivElement, Omit<DropdownProps,
             const [path, dispatchPath] = useReducer(pathReducer, []);
             const [focusedPath, dispatchFocusedPath] = useReducer(focusedPathReducer, []);
 
+            const isCurrentListOpen = alwaysOpened || Boolean(path[0]);
+
             const [pathMap, focusedToValueMap] = useHashMaps(items);
 
             const activeDescendantItemValue = getItemByFocused(focusedPath, focusedToValueMap)?.value || '';
@@ -94,6 +97,19 @@ export const dropdownRoot = (Root: RootProps<HTMLDivElement, Omit<DropdownProps,
                 }
             };
 
+            const onContextMenu = useCallback(
+                (e: React.MouseEvent) => {
+                    e.preventDefault();
+
+                    if (alwaysOpened) {
+                        return;
+                    }
+
+                    handleGlobalToggle(!isCurrentListOpen, e);
+                },
+                [handleGlobalToggle, isCurrentListOpen, alwaysOpened],
+            );
+
             const { onKeyDown } = useKeyNavigation({
                 focusedPath,
                 dispatchFocusedPath,
@@ -107,8 +123,6 @@ export const dropdownRoot = (Root: RootProps<HTMLDivElement, Omit<DropdownProps,
                 onItemClick,
             });
 
-            const isCurrentListOpen = alwaysOpened || Boolean(path[0]);
-
             return (
                 <Context.Provider
                     value={{
@@ -142,6 +156,7 @@ export const dropdownRoot = (Root: RootProps<HTMLDivElement, Omit<DropdownProps,
                                 ? getItemId(treeId, activeDescendantItemValue.toString())
                                 : '',
                             onKeyDown,
+                            onContextMenu: openByRightClick ? onContextMenu : undefined,
                         })}
                         zIndex={zIndex}
                     >
diff --git a/packages/plasma-new-hope/src/components/Dropdown/Dropdown.types.ts b/packages/plasma-new-hope/src/components/Dropdown/Dropdown.types.ts
index 939f5cb2ce3..7b914f80a96 100644
--- a/packages/plasma-new-hope/src/components/Dropdown/Dropdown.types.ts
+++ b/packages/plasma-new-hope/src/components/Dropdown/Dropdown.types.ts
@@ -35,17 +35,22 @@ export type DropdownProps<T extends DropdownItemOption = DropdownItemOption> = {
      */
     onItemSelect?: (item: T, event: SyntheticEvent) => void;
     /**
-     * Способ открытия дропдауна окна - наведение или клик мышью.
+     * Способ открытия Dropdown окна - наведение или клик мышью.
      * @default click
      */
     trigger?: DropdownTrigger;
     /**
-     * Сторона открытия дропдауна относительно target элемента.
+     * Открывает дропдаун окно по правому клику мышью
+     * @default false
+     */
+    openByRightClick?: boolean;
+    /**
+     * Сторона открытия Dropdown относительно target элемента.
      * @default bottom
      */
     placement?: DropdownPlacement;
     /**
-     * Отступ дропдауна относительно элемента, у которого оно вызвано.
+     * Отступ Dropdown относительно элемента, у которого оно вызвано.
      * @default [0, 0]
      */
     offset?: [number, number];
@@ -66,12 +71,12 @@ export type DropdownProps<T extends DropdownItemOption = DropdownItemOption> = {
      */
     closeOnSelect?: boolean;
     /**
-     * Закрывать окно при нажатии вне области дропдауна.
+     * Закрывать окно при нажатии вне области Dropdown.
      * @default true
      */
     closeOnOverlayClick?: boolean;
     /**
-     * Событие сворачивания/разворачивания дропдауна.
+     * Событие сворачивания/разворачивания Dropdown.
      */
     onToggle?: (isOpen: boolean, event: SyntheticEvent | Event) => void;
     size?: string;
diff --git a/packages/plasma-new-hope/src/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx b/packages/plasma-new-hope/src/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx
index b357c2cbdcf..630aaab5cf4 100644
--- a/packages/plasma-new-hope/src/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx
+++ b/packages/plasma-new-hope/src/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx
@@ -33,6 +33,11 @@ const meta: Meta<StoryDropdownProps> = {
                 type: 'select',
             },
         },
+        openByRightClick: {
+            control: {
+                type: 'boolean',
+            },
+        },
         size: {
             options: size,
             control: {
@@ -62,6 +67,7 @@ const meta: Meta<StoryDropdownProps> = {
         variant: 'normal',
         placement: 'bottom-start',
         trigger: 'click',
+        openByRightClick: false,
         offset: [0, 0],
         listWidth: '300px',
         hasArrow: true,
diff --git a/packages/plasma-new-hope/src/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx b/packages/plasma-new-hope/src/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx
index 66a6c93ec61..163caab6592 100644
--- a/packages/plasma-new-hope/src/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx
+++ b/packages/plasma-new-hope/src/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx
@@ -33,6 +33,11 @@ const meta: Meta<StoryDropdownProps> = {
                 type: 'select',
             },
         },
+        openByRightClick: {
+            control: {
+                type: 'boolean',
+            },
+        },
         size: {
             options: size,
             control: {
@@ -62,6 +67,7 @@ const meta: Meta<StoryDropdownProps> = {
         variant: 'normal',
         placement: 'bottom-start',
         trigger: 'click',
+        openByRightClick: false,
         offset: [0, 0],
         listWidth: '300px',
         hasArrow: true,
diff --git a/packages/plasma-web/api/plasma-web.api.md b/packages/plasma-web/api/plasma-web.api.md
index 2da46066be7..2f77779710b 100644
--- a/packages/plasma-web/api/plasma-web.api.md
+++ b/packages/plasma-web/api/plasma-web.api.md
@@ -1939,6 +1939,7 @@ default: PolymorphicClassName;
     onHover?: ((index: number) => void) | undefined;
     onItemSelect?: ((item: DropdownItemOption, event: React_2.SyntheticEvent<Element, Event>) => void) | undefined;
     trigger?: DropdownTrigger | undefined;
+    openByRightClick?: boolean | undefined;
     placement?: DropdownPlacement | undefined;
     offset?: [number, number] | undefined;
     listWidth?: Property.Width<string | number> | undefined;
diff --git a/packages/plasma-web/src/components/Dropdown/Dropdown.stories.tsx b/packages/plasma-web/src/components/Dropdown/Dropdown.stories.tsx
index b3366d7bcbd..bbd6c3ff510 100644
--- a/packages/plasma-web/src/components/Dropdown/Dropdown.stories.tsx
+++ b/packages/plasma-web/src/components/Dropdown/Dropdown.stories.tsx
@@ -33,6 +33,11 @@ const meta: Meta<DropdownProps> = {
                 type: 'select',
             },
         },
+        openByRightClick: {
+            control: {
+                type: 'boolean',
+            },
+        },
         size: {
             options: size,
             control: {
@@ -62,6 +67,7 @@ const meta: Meta<DropdownProps> = {
         variant: 'normal',
         placement: 'bottom-start',
         trigger: 'click',
+        openByRightClick: false,
         offset: [0, 0],
         listWidth: '300px',
         hasArrow: true,
diff --git a/packages/sdds-cs/api/sdds-cs.api.md b/packages/sdds-cs/api/sdds-cs.api.md
index f7aa3af2756..ec1a9f861bb 100644
--- a/packages/sdds-cs/api/sdds-cs.api.md
+++ b/packages/sdds-cs/api/sdds-cs.api.md
@@ -1521,6 +1521,7 @@ default: PolymorphicClassName;
     onHover?: ((index: number) => void) | undefined;
     onItemSelect?: ((item: DropdownItemOption, event: React_2.SyntheticEvent<Element, Event>) => void) | undefined;
     trigger?: DropdownTrigger | undefined;
+    openByRightClick?: boolean | undefined;
     placement?: DropdownPlacement | undefined;
     offset?: [number, number] | undefined;
     listWidth?: Property.Width<string | number> | undefined;
diff --git a/packages/sdds-cs/src/components/Dropdown/Dropdown.stories.tsx b/packages/sdds-cs/src/components/Dropdown/Dropdown.stories.tsx
index c775fdc3957..b224544b7d0 100644
--- a/packages/sdds-cs/src/components/Dropdown/Dropdown.stories.tsx
+++ b/packages/sdds-cs/src/components/Dropdown/Dropdown.stories.tsx
@@ -33,6 +33,11 @@ const meta: Meta<DropdownProps> = {
                 type: 'select',
             },
         },
+        openByRightClick: {
+            control: {
+                type: 'boolean',
+            },
+        },
         size: {
             options: size,
             control: {
@@ -62,6 +67,7 @@ const meta: Meta<DropdownProps> = {
         variant: 'normal',
         placement: 'bottom-start',
         trigger: 'click',
+        openByRightClick: false,
         offset: [0, 0],
         listWidth: '300px',
         hasArrow: true,
diff --git a/packages/sdds-dfa/api/sdds-dfa.api.md b/packages/sdds-dfa/api/sdds-dfa.api.md
index 8b03f3e1280..cb48321b37f 100644
--- a/packages/sdds-dfa/api/sdds-dfa.api.md
+++ b/packages/sdds-dfa/api/sdds-dfa.api.md
@@ -1605,6 +1605,7 @@ default: PolymorphicClassName;
     onHover?: ((index: number) => void) | undefined;
     onItemSelect?: ((item: DropdownItemOption, event: React_2.SyntheticEvent<Element, Event>) => void) | undefined;
     trigger?: DropdownTrigger | undefined;
+    openByRightClick?: boolean | undefined;
     placement?: DropdownPlacement | undefined;
     offset?: [number, number] | undefined;
     listWidth?: Property.Width<string | number> | undefined;
diff --git a/packages/sdds-dfa/src/components/Dropdown/Dropdown.stories.tsx b/packages/sdds-dfa/src/components/Dropdown/Dropdown.stories.tsx
index 23c8bdb9810..cf51a2a4f24 100644
--- a/packages/sdds-dfa/src/components/Dropdown/Dropdown.stories.tsx
+++ b/packages/sdds-dfa/src/components/Dropdown/Dropdown.stories.tsx
@@ -33,6 +33,11 @@ const meta: Meta<DropdownProps> = {
                 type: 'select',
             },
         },
+        openByRightClick: {
+            control: {
+                type: 'boolean',
+            },
+        },
         size: {
             options: size,
             control: {
@@ -62,6 +67,7 @@ const meta: Meta<DropdownProps> = {
         variant: 'normal',
         placement: 'bottom-start',
         trigger: 'click',
+        openByRightClick: false,
         offset: [0, 0],
         listWidth: '300px',
         hasArrow: true,
diff --git a/packages/sdds-finportal/api/sdds-finportal.api.md b/packages/sdds-finportal/api/sdds-finportal.api.md
index a3a3ba42844..f28171f5275 100644
--- a/packages/sdds-finportal/api/sdds-finportal.api.md
+++ b/packages/sdds-finportal/api/sdds-finportal.api.md
@@ -1655,6 +1655,7 @@ default: PolymorphicClassName;
     onHover?: ((index: number) => void) | undefined;
     onItemSelect?: ((item: DropdownItemOption, event: React_2.SyntheticEvent<Element, Event>) => void) | undefined;
     trigger?: DropdownTrigger | undefined;
+    openByRightClick?: boolean | undefined;
     placement?: DropdownPlacement | undefined;
     offset?: [number, number] | undefined;
     listWidth?: Property.Width<string | number> | undefined;
diff --git a/packages/sdds-finportal/src/components/Dropdown/Dropdown.stories.tsx b/packages/sdds-finportal/src/components/Dropdown/Dropdown.stories.tsx
index 23c8bdb9810..cf51a2a4f24 100644
--- a/packages/sdds-finportal/src/components/Dropdown/Dropdown.stories.tsx
+++ b/packages/sdds-finportal/src/components/Dropdown/Dropdown.stories.tsx
@@ -33,6 +33,11 @@ const meta: Meta<DropdownProps> = {
                 type: 'select',
             },
         },
+        openByRightClick: {
+            control: {
+                type: 'boolean',
+            },
+        },
         size: {
             options: size,
             control: {
@@ -62,6 +67,7 @@ const meta: Meta<DropdownProps> = {
         variant: 'normal',
         placement: 'bottom-start',
         trigger: 'click',
+        openByRightClick: false,
         offset: [0, 0],
         listWidth: '300px',
         hasArrow: true,
diff --git a/packages/sdds-insol/api/sdds-insol.api.md b/packages/sdds-insol/api/sdds-insol.api.md
index 12f166e7765..5e7d1308f94 100644
--- a/packages/sdds-insol/api/sdds-insol.api.md
+++ b/packages/sdds-insol/api/sdds-insol.api.md
@@ -1375,6 +1375,7 @@ default: PolymorphicClassName;
     onHover?: ((index: number) => void) | undefined;
     onItemSelect?: ((item: DropdownItemOption, event: React_2.SyntheticEvent<Element, Event>) => void) | undefined;
     trigger?: DropdownTrigger | undefined;
+    openByRightClick?: boolean | undefined;
     placement?: DropdownPlacement | undefined;
     offset?: [number, number] | undefined;
     listWidth?: Property.Width<string | number> | undefined;
diff --git a/packages/sdds-insol/src/components/Dropdown/Dropdown.stories.tsx b/packages/sdds-insol/src/components/Dropdown/Dropdown.stories.tsx
index 3b82c6a5399..a1ee2e19e09 100644
--- a/packages/sdds-insol/src/components/Dropdown/Dropdown.stories.tsx
+++ b/packages/sdds-insol/src/components/Dropdown/Dropdown.stories.tsx
@@ -34,6 +34,11 @@ const meta: Meta<DropdownProps> = {
                 type: 'select',
             },
         },
+        openByRightClick: {
+            control: {
+                type: 'boolean',
+            },
+        },
         size: {
             options: size,
             control: {
@@ -63,6 +68,7 @@ const meta: Meta<DropdownProps> = {
         variant: 'normal',
         placement: 'bottom-start',
         trigger: 'click',
+        openByRightClick: false,
         offset: [0, 0],
         listWidth: '300px',
         hasArrow: true,
diff --git a/packages/sdds-serv/api/sdds-serv.api.md b/packages/sdds-serv/api/sdds-serv.api.md
index e3d85ff2ad4..2131bdb39ca 100644
--- a/packages/sdds-serv/api/sdds-serv.api.md
+++ b/packages/sdds-serv/api/sdds-serv.api.md
@@ -1657,6 +1657,7 @@ default: PolymorphicClassName;
     onHover?: ((index: number) => void) | undefined;
     onItemSelect?: ((item: DropdownItemOption, event: React_2.SyntheticEvent<Element, Event>) => void) | undefined;
     trigger?: DropdownTrigger | undefined;
+    openByRightClick?: boolean | undefined;
     placement?: DropdownPlacement | undefined;
     offset?: [number, number] | undefined;
     listWidth?: Property.Width<string | number> | undefined;
diff --git a/packages/sdds-serv/src/components/Dropdown/Dropdown.stories.tsx b/packages/sdds-serv/src/components/Dropdown/Dropdown.stories.tsx
index 23c8bdb9810..cf51a2a4f24 100644
--- a/packages/sdds-serv/src/components/Dropdown/Dropdown.stories.tsx
+++ b/packages/sdds-serv/src/components/Dropdown/Dropdown.stories.tsx
@@ -33,6 +33,11 @@ const meta: Meta<DropdownProps> = {
                 type: 'select',
             },
         },
+        openByRightClick: {
+            control: {
+                type: 'boolean',
+            },
+        },
         size: {
             options: size,
             control: {
@@ -62,6 +67,7 @@ const meta: Meta<DropdownProps> = {
         variant: 'normal',
         placement: 'bottom-start',
         trigger: 'click',
+        openByRightClick: false,
         offset: [0, 0],
         listWidth: '300px',
         hasArrow: true,


Reviews:
user: login: TitanKuzmich
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-03T07:16:41Z
user: login: denivladislav
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-03T07:23:29Z
user: login: shuga2704
state: CHANGES_REQUESTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-03T07:25:38Z
user: login: denivladislav
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-03T07:30:14Z
user: login: vadim-kudr
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-12T08:58:29Z
user: login: shuga2704
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-12T13:20:12Z
user: login: shuga2704
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-03-12T13:20:23Z
user: login: denivladislav
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-03-12T13:29:25Z

Review comments:
diff_hunk: @@ -33,6 +33,11 @@ const meta: Meta<DropdownProps> = {
                 type: 'select',
             },
         },
+        openByRightClick: {
+            control: {
+                type: 'boolean',
+            },
+        },
path: packages/plasma-b2c/src/components/Dropdown/Dropdown.stories.tsx
user: login: TitanKuzmich
body: В include не добавлен контрол, поэтому нет возможности протыкать
created_at: 2025-03-03T07:16:41Z
author_association: CONTRIBUTOR
path: packages/plasma-new-hope/src/components/Dropdown/Dropdown.types.ts
user: login: shuga2704
body: Давай заменим слова дропдаун, Dropdown на "выпадающий список". По аналогии со схожими компонентами.
created_at: 2025-03-03T07:17:31Z
author_association: CONTRIBUTOR
diff_hunk: @@ -35,17 +35,22 @@ export type DropdownProps<T extends DropdownItemOption = DropdownItemOption> = {
      */
     onItemSelect?: (item: T, event: SyntheticEvent) => void;
     /**
-     * Способ открытия дропдауна окна - наведение или клик мышью.
+     * Способ открытия Dropdown окна - наведение или клик мышью.
      * @default click
      */
     trigger?: DropdownTrigger;
     /**
-     * Сторона открытия дропдауна относительно target элемента.
+     * Открывает дропдаун окно по правому клику мышью
path: packages/plasma-new-hope/src/components/Dropdown/Dropdown.types.ts
user: login: denivladislav
body: Тут тогда тоже должно быть так по аналогии с соседними правками:

```suggestion
     * Открывает Dropdown окно по правому клику мышью
```
created_at: 2025-03-03T07:23:28Z
author_association: CONTRIBUTOR
diff_hunk: @@ -94,6 +97,19 @@ export const dropdownRoot = (Root: RootProps<HTMLDivElement, Omit<DropdownProps,
                 }
             };
 
+            const onContextMenu = useCallback(
path: packages/plasma-new-hope/src/components/Dropdown/Dropdown.tsx
user: login: shuga2704
body: Зачем тут useCallback?
created_at: 2025-03-03T07:24:21Z
author_association: CONTRIBUTOR
diff_hunk: @@ -33,6 +33,11 @@ const meta: Meta<DropdownProps> = {
                 type: 'select',
             },
         },
+        openByRightClick: {
+            control: {
+                type: 'boolean',
+            },
+        },
path: packages/plasma-b2c/src/components/Dropdown/Dropdown.stories.tsx
user: login: denivladislav
body: это актуально для всех либ, кроме new-hope
created_at: 2025-03-03T07:30:14Z
author_association: CONTRIBUTOR
diff_hunk: @@ -94,6 +97,19 @@ export const dropdownRoot = (Root: RootProps<HTMLDivElement, Omit<DropdownProps,
                 }
             };
 
+            const onContextMenu = useCallback(
path: packages/plasma-new-hope/src/components/Dropdown/Dropdown.tsx
user: login: vadim-kudr
body: в дочерние элементы уходит
created_at: 2025-03-12T08:58:29Z
author_association: CONTRIBUTOR
diff_hunk: @@ -94,6 +97,19 @@ export const dropdownRoot = (Root: RootProps<HTMLDivElement, Omit<DropdownProps,
                 }
             };
 
+            const onContextMenu = useCallback(
path: packages/plasma-new-hope/src/components/Dropdown/Dropdown.tsx
user: login: shuga2704
body: Но ведь на 128 строке создается новый объект, поэтому мемоизация не сработает в любом случае. А ты замерял производительность, что-нибудь дает этот useCallback?
created_at: 2025-03-12T13:20:12Z
author_association: CONTRIBUTOR

PR comments:
user: login: github-actions[bot]
created_at: 2025-02-23T16:24:46Z
body: Theme Builder app deployed!

https://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-1791/
<!-- Sticky Pull Request CommentTheme Builder -->
author_association: CONTRIBUTOR
user: login: github-actions[bot]
created_at: 2025-02-23T16:41:52Z
body: Documentation preview deployed!

website: https://plasma.sberdevices.ru/pr/pr-1791/
asdk storybook: https://plasma.sberdevices.ru/pr/pr-1791/asdk-storybook/
b2c storybook: https://plasma.sberdevices.ru/pr/pr-1791/b2c-storybook/
giga storybook: https://plasma.sberdevices.ru/pr/pr-1791/giga-storybook/
new-hope storybook: https://plasma.sberdevices.ru/pr/pr-1791/new-hope-storybook/
web storybook: https://plasma.sberdevices.ru/pr/pr-1791/web-storybook/
sdds-cs storybook: https://plasma.sberdevices.ru/pr/pr-1791/sdds-cs-storybook/
sdds-dfa storybook: https://plasma.sberdevices.ru/pr/pr-1791/sdds-dfa-storybook/
sdds-finportal storybook: https://plasma.sberdevices.ru/pr/pr-1791/sdds-finportal-storybook/
sdds-insol storybook: https://plasma.sberdevices.ru/pr/pr-1791/sdds-insol-storybook/
sdds-serv storybook: https://plasma.sberdevices.ru/pr/pr-1791/sdds-serv-storybook/
ui storybook: https://plasma.sberdevices.ru/pr/pr-1791/ui-storybook/
<!-- Sticky Pull Request CommentLinks -->
author_association: CONTRIBUTOR
user: login: TitanKuzmich
created_at: 2025-03-03T07:20:39Z
body: Точно через провайдер должно подвязываться событие клика правой кнопкой мыши?
Не через событие на document
author_association: CONTRIBUTOR
user: login: vadim-kudr
created_at: 2025-03-12T11:40:37Z
body: > Точно через провайдер должно подвязываться событие клика правой кнопкой мыши? Не через событие на document

не понял. через документ не стоит подвязываться
author_association: CONTRIBUTOR