mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-24 11:47:11 +08:00
Refactor: enable node copy for multiple selection
This commit is contained in:
committed by
Gabriel Luiz Freitas Almeida
parent
363ea8895e
commit
87cf28e158
@ -228,7 +228,8 @@ export default function Page({
|
||||
}
|
||||
|
||||
function handleCopy(e: KeyboardEvent) {
|
||||
if (!isWrappedWithClass(e, "nocopy") && isWrappedWithClass(e, "react-flow__node")) {
|
||||
const multipleSelection = lastSelection?.nodes ? lastSelection?.nodes.length > 0 : false;
|
||||
if (!isWrappedWithClass(e, "nocopy") && (isWrappedWithClass(e, "react-flow__node") || multipleSelection)) {
|
||||
e.preventDefault();
|
||||
(e as unknown as Event).stopImmediatePropagation();
|
||||
if (window.getSelection()?.toString().length === 0 && lastSelection) {
|
||||
|
||||
Reference in New Issue
Block a user