mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
fix: improve ref handling
This commit is contained in:
@@ -143,11 +143,8 @@ export const CreateSecretForm = ({
|
||||
{...secretKeyRegisterRest}
|
||||
ref={(e) => {
|
||||
setSecretKeyHookRef(e);
|
||||
// Can't directly set secretKeyInputRef.current = e, because of read-only property definitions
|
||||
Object.defineProperty(secretKeyInputRef, "current", {
|
||||
value: e,
|
||||
writable: true
|
||||
});
|
||||
// @ts-expect-error this is for multiple ref single component
|
||||
secretKeyInputRef.current = e;
|
||||
}}
|
||||
placeholder="Type your secret name"
|
||||
onPaste={handlePaste}
|
||||
|
||||
@@ -206,11 +206,8 @@ export const CreateSecretForm = ({ secretPath = "/", onClose }: Props) => {
|
||||
{...secretKeyRegisterRest}
|
||||
ref={(e) => {
|
||||
setSecretKeyHookRef(e);
|
||||
// Can't directly set secretKeyInputRef.current = e, because of read-only property definitions
|
||||
Object.defineProperty(secretKeyInputRef, "current", {
|
||||
value: e,
|
||||
writable: true
|
||||
});
|
||||
// @ts-expect-error this is for multiple ref single component
|
||||
secretKeyInputRef.current = e;
|
||||
}}
|
||||
placeholder="Type your secret name"
|
||||
onPaste={handlePaste}
|
||||
|
||||
Reference in New Issue
Block a user