Add option to prevent Input field caching (#1240)
This commit is contained in:
commit
96decde4ed
|
@ -30,6 +30,7 @@ export interface SingleInputFormProps {
|
||||||
autoComplete?: string;
|
autoComplete?: string;
|
||||||
blockButton?: boolean;
|
blockButton?: boolean;
|
||||||
hiddenLabel?: boolean;
|
hiddenLabel?: boolean;
|
||||||
|
disableAutoComplete?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function SingleInputForm(props: SingleInputFormProps) {
|
export default function SingleInputForm(props: SingleInputFormProps) {
|
||||||
|
@ -109,6 +110,11 @@ export default function SingleInputForm(props: SingleInputFormProps) {
|
||||||
autoFocus={!props.disableAutoFocus}
|
autoFocus={!props.disableAutoFocus}
|
||||||
autoComplete={props.autoComplete}
|
autoComplete={props.autoComplete}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
|
autoComplete:
|
||||||
|
props.disableAutoComplete ||
|
||||||
|
props.fieldType === 'password'
|
||||||
|
? 'off'
|
||||||
|
: 'on',
|
||||||
endAdornment: props.fieldType === 'password' && (
|
endAdornment: props.fieldType === 'password' && (
|
||||||
<ShowHidePassword
|
<ShowHidePassword
|
||||||
showPassword={showPassword}
|
showPassword={showPassword}
|
||||||
|
|
|
@ -105,6 +105,7 @@ export default function Recover() {
|
||||||
fieldType="text"
|
fieldType="text"
|
||||||
placeholder={t('RECOVERY_KEY_HINT')}
|
placeholder={t('RECOVERY_KEY_HINT')}
|
||||||
buttonText={t('RECOVER')}
|
buttonText={t('RECOVER')}
|
||||||
|
disableAutoComplete
|
||||||
/>
|
/>
|
||||||
<FormPaperFooter style={{ justifyContent: 'space-between' }}>
|
<FormPaperFooter style={{ justifyContent: 'space-between' }}>
|
||||||
<LinkButton onClick={showNoRecoveryKeyMessage}>
|
<LinkButton onClick={showNoRecoveryKeyMessage}>
|
||||||
|
|
|
@ -152,6 +152,7 @@ export default function Recover() {
|
||||||
fieldType="text"
|
fieldType="text"
|
||||||
placeholder={t('RECOVERY_KEY_HINT')}
|
placeholder={t('RECOVERY_KEY_HINT')}
|
||||||
buttonText={t('RECOVER')}
|
buttonText={t('RECOVER')}
|
||||||
|
disableAutoComplete
|
||||||
/>
|
/>
|
||||||
<FormPaperFooter style={{ justifyContent: 'space-between' }}>
|
<FormPaperFooter style={{ justifyContent: 'space-between' }}>
|
||||||
<LinkButton onClick={() => showContactSupportDialog()}>
|
<LinkButton onClick={() => showContactSupportDialog()}>
|
||||||
|
|
Loading…
Reference in a new issue