Fixed double click on description opening Settings modal
This commit is contained in:
parent
113b47804f
commit
cfff4e3f1e
1 changed files with 14 additions and 5 deletions
|
|
@ -27,7 +27,13 @@ import { validationStatusType } from "../../types/components";
|
|||
import { NodeDataType } from "../../types/flow";
|
||||
import { handleKeyDown, scapedJSONStringfy } from "../../utils/reactflowUtils";
|
||||
import { nodeColors, nodeIconsLucide } from "../../utils/styleUtils";
|
||||
import { classNames, cn, getFieldTitle, sortFields } from "../../utils/utils";
|
||||
import {
|
||||
classNames,
|
||||
cn,
|
||||
getFieldTitle,
|
||||
isWrappedWithClass,
|
||||
sortFields,
|
||||
} from "../../utils/utils";
|
||||
import ParameterComponent from "./components/parameterComponent";
|
||||
|
||||
export default function GenericNode({
|
||||
|
|
@ -387,14 +393,17 @@ export default function GenericNode({
|
|||
isOutdated,
|
||||
selected,
|
||||
openWDoubleCLick,
|
||||
setOpenWDoubleCLick
|
||||
setOpenWDoubleCLick,
|
||||
]);
|
||||
|
||||
return (
|
||||
<>
|
||||
{memoizedNodeToolbarComponent}
|
||||
<div
|
||||
onDoubleClick={() => setOpenWDoubleCLick(true)}
|
||||
onDoubleClick={(event) => {
|
||||
if (!isWrappedWithClass(event, "nodoubleclick"))
|
||||
setOpenWDoubleCLick(true);
|
||||
}}
|
||||
className={getNodeBorderClassName(
|
||||
selected,
|
||||
showNode,
|
||||
|
|
@ -467,7 +476,7 @@ export default function GenericNode({
|
|||
event.preventDefault();
|
||||
}}
|
||||
data-testid={"title-" + data.node?.display_name}
|
||||
className="generic-node-tooltip-div cursor-text text-primary"
|
||||
className="nodoubleclick generic-node-tooltip-div cursor-text text-primary"
|
||||
>
|
||||
{data.node?.display_name}
|
||||
</div>
|
||||
|
|
@ -720,7 +729,7 @@ export default function GenericNode({
|
|||
) : (
|
||||
<div
|
||||
className={cn(
|
||||
"generic-node-desc-text truncate-multiline word-break-break-word",
|
||||
"nodoubleclick generic-node-desc-text truncate-multiline word-break-break-word",
|
||||
(data.node?.description === "" ||
|
||||
!data.node?.description) &&
|
||||
nameEditable
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue