mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 15:28:25 +00:00
fix: add todo
This commit is contained in:
@@ -113,7 +113,7 @@ export const SecretInput = forwardRef<HTMLTextAreaElement, Props>(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move to react query
|
// Todo: Move to react query
|
||||||
const [encryptSecrets, folders] = await Promise.all([
|
const [encryptSecrets, folders] = await Promise.all([
|
||||||
fetchProjectEncryptedSecrets({
|
fetchProjectEncryptedSecrets({
|
||||||
workspaceId,
|
workspaceId,
|
||||||
@@ -198,6 +198,7 @@ export const SecretInput = forwardRef<HTMLTextAreaElement, Props>(
|
|||||||
const newValue = `${value.slice(0, currCaretPos)}}${value.slice(currCaretPos)}`;
|
const newValue = `${value.slice(0, currCaretPos)}}${value.slice(currCaretPos)}`;
|
||||||
|
|
||||||
setValue(newValue);
|
setValue(newValue);
|
||||||
|
// TODO: there should be a better way to do
|
||||||
onChange?.({ target: { value: newValue } } as any);
|
onChange?.({ target: { value: newValue } } as any);
|
||||||
|
|
||||||
if (event.currentTarget) {
|
if (event.currentTarget) {
|
||||||
@@ -273,6 +274,7 @@ export const SecretInput = forwardRef<HTMLTextAreaElement, Props>(
|
|||||||
}
|
}
|
||||||
newValue = `${start}$\{${replaceReference}}${end}`;
|
newValue = `${start}$\{${replaceReference}}${end}`;
|
||||||
setValue(newValue);
|
setValue(newValue);
|
||||||
|
// TODO: there should be a better way to do
|
||||||
onChange?.({ target: { value: newValue } } as any);
|
onChange?.({ target: { value: newValue } } as any);
|
||||||
setCaretPos(start.length + replaceReference.length + offset);
|
setCaretPos(start.length + replaceReference.length + offset);
|
||||||
if (type !== "secret") extractReference(replaceReference);
|
if (type !== "secret") extractReference(replaceReference);
|
||||||
|
|||||||
Reference in New Issue
Block a user