web: Components: Added showing password on click generate button at PasswordInput component
This commit is contained in:
parent
5741cafc0f
commit
af172c8fc0
@ -65,7 +65,7 @@ const Progress = styled.div`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const StyledTooltipContainer = styled(Text.Body)`
|
const StyledTooltipContainer = styled(Text.Body)`
|
||||||
/*margin: 8px 16px 16px 16px;*/
|
//margin: 8px 16px 16px 16px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const StyledTooltipItem = styled(Text.Body)`
|
const StyledTooltipItem = styled(Text.Body)`
|
||||||
@ -184,6 +184,13 @@ class PasswordInput extends React.Component {
|
|||||||
return e.preventDefault();
|
return e.preventDefault();
|
||||||
|
|
||||||
const newPassword = this.getNewPassword();
|
const newPassword = this.getNewPassword();
|
||||||
|
|
||||||
|
if (this.state.type !== 'text') {
|
||||||
|
this.setState({
|
||||||
|
type: 'text'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
this.checkPassword(newPassword);
|
this.checkPassword(newPassword);
|
||||||
this.props.onChange && this.props.onChange({ target: { value: newPassword } });
|
this.props.onChange && this.props.onChange({ target: { value: newPassword } });
|
||||||
}
|
}
|
||||||
@ -352,7 +359,7 @@ class PasswordInput extends React.Component {
|
|||||||
tabIndex={tabIndex}
|
tabIndex={tabIndex}
|
||||||
maxLength={maxLength}
|
maxLength={maxLength}
|
||||||
autoComplete={autoComplete}
|
autoComplete={autoComplete}
|
||||||
>
|
>
|
||||||
</InputBlock>
|
</InputBlock>
|
||||||
<TooltipStyle>
|
<TooltipStyle>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
|
Loading…
Reference in New Issue
Block a user