From eff91bffad56e272daaec9d51cdc94f5f62cd40e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=BB=D1=8C=D1=8F=D1=81=20=D0=A1=D1=83=D0=BB=D1=82?= =?UTF-8?q?=D0=B0=D0=BD=D0=BE=D0=B2?= Date: Mon, 20 Jul 2026 22:27:12 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20=D0=BF=D1=80=D0=BE=D0=BA=D1=80=D1=83?= =?UTF-8?q?=D1=82=D0=BA=D0=B0=20=D0=BA=D0=BE=D0=BB=D1=91=D1=81=D0=B8=D0=BA?= =?UTF-8?q?=D0=BE=D0=BC=20=D0=B8=20tooltip=20=D0=B4=D0=BB=D1=8F=20=D0=B4?= =?UTF-8?q?=D0=BB=D0=B8=D0=BD=D0=BD=D1=8B=D1=85=20=D0=BD=D0=B0=D0=B7=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D0=B9=20=D0=B2=20=D0=BF=D0=BE=D0=BB=D0=B5=20?= =?UTF-8?q?=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BE=D1=87=D0=BD=D0=B8=D0=BA?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/TableFieldMultiSelect.tsx | 15 ++++++- client/src/components/TableFieldSelect.tsx | 42 +++++++++++++------ .../directories/DirectoryTreeMultiSelect.tsx | 2 + .../directories/DirectoryTreeSelect.tsx | 3 +- 4 files changed, 47 insertions(+), 15 deletions(-) diff --git a/client/src/components/TableFieldMultiSelect.tsx b/client/src/components/TableFieldMultiSelect.tsx index 1c5578d..92ba430 100644 --- a/client/src/components/TableFieldMultiSelect.tsx +++ b/client/src/components/TableFieldMultiSelect.tsx @@ -172,7 +172,19 @@ export default function TableFieldMultiSelect({ } }} > -
+
{ + const el = e.currentTarget; + const isUp = e.deltaY < 0; + const isDown = e.deltaY > 0; + const atTop = el.scrollTop <= 0; + const atBottom = el.scrollTop + el.clientHeight >= el.scrollHeight - 1; + if ((isUp && atTop) || (isDown && atBottom)) return; + e.preventDefault(); + el.scrollTop += e.deltaY; + }} + > {hasTree ? ( { e.preventDefault(); toggle(rowId); }} > diff --git a/client/src/components/TableFieldSelect.tsx b/client/src/components/TableFieldSelect.tsx index 07214f4..89bc3b6 100644 --- a/client/src/components/TableFieldSelect.tsx +++ b/client/src/components/TableFieldSelect.tsx @@ -157,7 +157,19 @@ export default function TableFieldSelect({ } }} > -
+
{ + const el = e.currentTarget; + const isUp = e.deltaY < 0; + const isDown = e.deltaY > 0; + const atTop = el.scrollTop <= 0; + const atBottom = el.scrollTop + el.clientHeight >= el.scrollHeight - 1; + if ((isUp && atTop) || (isDown && atBottom)) return; + e.preventDefault(); + el.scrollTop += e.deltaY; + }} + > {hasTree ? ( — - {filtered.map((row) => ( -
  • { e.preventDefault(); handleSelect(row.id.toString()); }} - > -
    - - {row.values[displayColumnIndex!] || row.values[0]} - - - ))} + {filtered.map((row) => { + const label = row.values[displayColumnIndex!] || row.values[0] || ''; + return ( +
  • { e.preventDefault(); handleSelect(row.id.toString()); }} + > +
    +
  • + {label} + + + ); + })} {filtered.length === 0 && (
  • Нет совпадений
  • )} diff --git a/client/src/components/directories/DirectoryTreeMultiSelect.tsx b/client/src/components/directories/DirectoryTreeMultiSelect.tsx index 27f3fec..d7e6a37 100644 --- a/client/src/components/directories/DirectoryTreeMultiSelect.tsx +++ b/client/src/components/directories/DirectoryTreeMultiSelect.tsx @@ -74,6 +74,7 @@ function TreeNode({ className="flex items-center gap-1.5 px-2 py-1.5 text-sm rounded hover:bg-accent cursor-pointer" style={{ paddingLeft: `${node.level * 16 + 28}px` }} onMouseDown={(e) => { e.preventDefault(); onToggle(rowId); }} + title={node.label} > @@ -94,6 +95,7 @@ function TreeNode({ e.preventDefault(); onToggleExpand(node.id); }} + title={node.label} > {isExpanded ? ( diff --git a/client/src/components/directories/DirectoryTreeSelect.tsx b/client/src/components/directories/DirectoryTreeSelect.tsx index 26f0033..8967017 100644 --- a/client/src/components/directories/DirectoryTreeSelect.tsx +++ b/client/src/components/directories/DirectoryTreeSelect.tsx @@ -80,7 +80,7 @@ function TreeNode({ onClick={() => onChange(rowId)} > - {node.label} + {node.label} ); } @@ -93,6 +93,7 @@ function TreeNode({ className="w-full flex items-center gap-1.5 px-2 py-1.5 text-sm rounded hover:bg-accent text-left font-medium" style={{ paddingLeft: `${node.level * 16 + 8}px` }} onClick={() => onToggle(node.id)} + title={node.label} > {isExpanded ? (