mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
fix: clear selection if modal is closed through cancel button and secrets have been moved
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { useMemo, useState } from "react";
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import { SingleValue } from "react-select";
|
||||
import { subject } from "@casl/ability";
|
||||
import { IconDefinition } from "@fortawesome/free-brands-svg-icons";
|
||||
@@ -236,6 +236,12 @@ const Content = ({
|
||||
setMoveResults(results);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
if (moveResults) onComplete();
|
||||
};
|
||||
}, [moveResults]);
|
||||
|
||||
if (moveResults) {
|
||||
return (
|
||||
<div className="w-full">
|
||||
|
||||
Reference in New Issue
Block a user