Fixed ctrl+u
This commit is contained in:
parent
7ea22986a7
commit
035ada860d
1 changed files with 9 additions and 1 deletions
|
|
@ -64,7 +64,6 @@ export default function NodeToolbarComponent({
|
|||
const hasStore = useStoreStore((state) => state.hasStore);
|
||||
const hasApiKey = useStoreStore((state) => state.hasApiKey);
|
||||
const validApiKey = useStoreStore((state) => state.validApiKey);
|
||||
const [updateMinimize, setUpdateMinimize] = useState(showNode);
|
||||
|
||||
const isMinimal = numberOfHandles <= 1;
|
||||
const isGroup = data.node?.flow ? true : false;
|
||||
|
|
@ -268,6 +267,15 @@ export default function NodeToolbarComponent({
|
|||
|
||||
useEffect(() => {
|
||||
function onKeyDown(event: KeyboardEvent) {
|
||||
if (
|
||||
selected &&
|
||||
(hasApiKey || hasStore) &&
|
||||
(event.ctrlKey || event.metaKey) &&
|
||||
event.key === "u"
|
||||
) {
|
||||
event.preventDefault();
|
||||
handleSelectChange("update");
|
||||
}
|
||||
if (
|
||||
selected &&
|
||||
isGroup &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue