mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 05:27:48 +00:00
fix: trimming
This commit is contained in:
committed by
Akhil Mohan
parent
3be3867579
commit
ef7bf09398
@@ -56,12 +56,12 @@ export const SecretInput = forwardRef<HTMLTextAreaElement, Props>(
|
|||||||
const update = (code: string) => {
|
const update = (code: string) => {
|
||||||
setText(code);
|
setText(code);
|
||||||
if (onChange) {
|
if (onChange) {
|
||||||
onChange(code);
|
onChange(code.trim());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const onInput = (event: any) => {
|
const onInput = (event: any) => {
|
||||||
const code = event.target.value.trim() || "";
|
const code = event.target.value || "";
|
||||||
update(code);
|
update(code);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ export const SecretInput = forwardRef<HTMLTextAreaElement, Props>(
|
|||||||
<textarea
|
<textarea
|
||||||
aria-label="secret value"
|
aria-label="secret value"
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={`textarea absolute inset-0 h-full overflow-hidden block focus:border-0 resize-none bg-transparent text-transparent ${commonClassName}`}
|
className={`textarea absolute inset-0 block h-full resize-none overflow-hidden bg-transparent text-transparent focus:border-0 ${commonClassName}`}
|
||||||
value={text}
|
value={text}
|
||||||
onChange={onInput}
|
onChange={onInput}
|
||||||
onFocus={() => setIsSecretFocused.on()}
|
onFocus={() => setIsSecretFocused.on()}
|
||||||
|
|||||||
Reference in New Issue
Block a user