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