-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7221 from TouK/1.18-ports7
1.18 ports7
- Loading branch information
Showing
10 changed files
with
87 additions
and
32 deletions.
There are no files selected for viewing
Binary file modified
BIN
-731 Bytes
(99%)
...d allow adding input parameters and display used fragment graph in modal #1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
designer/client/src/components/toolbars/scenarioDetails/useDelayedEnterAction.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { useEffect, useState } from "react"; | ||
|
||
interface Props { | ||
inputTyping: boolean; | ||
errorsLength: number; | ||
action: () => void; | ||
} | ||
|
||
export const useDelayedEnterAction = ({ inputTyping, errorsLength, action }: Props) => { | ||
const [isEnterPressed, setIsEnterPressed] = useState(false); | ||
|
||
useEffect(() => { | ||
if (isEnterPressed && !inputTyping && errorsLength === 0) { | ||
action(); | ||
setIsEnterPressed(false); | ||
} | ||
}, [errorsLength, inputTyping, isEnterPressed, action]); | ||
|
||
return { setIsEnterPressed }; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters