From 100b5c93309ec79e901ec97d093f196649d12100 Mon Sep 17 00:00:00 2001 From: Mikel Tuesta Date: Thu, 5 Jul 2018 14:20:52 +0200 Subject: [PATCH] The field's value is now passed as a prop and it has a new-password as it's default value --- CHANGELOG.md | 2 ++ package.json | 2 +- .../ui/react/components/FormGroupInput/FormGroupInput.js | 8 +++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9797191..b74747c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ This changelog references the relevant changes done between versions. To get the diff for a specific change, go to https://github.com/LIN3S/FrontFoundation/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/LIN3S/FrontFoundation/compare/v0.5.0...v0.6.0 +* 0.19.2 + * The `autocomplete` field's value is now passed as a prop and it has a "new-password" as it's default value. * 0.19.1 * Added the `validatory` dependency as a peerDependency. * 0.19.0 diff --git a/package.json b/package.json index 842857a4..0810f42d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lin3s-front-foundation", - "version": "0.19.1", + "version": "0.19.2", "author": "LIN3S", "license": "MIT", "description": "Library that provides a sort of commonly used front-end components in LIN3S projects", diff --git a/src/js/ui/react/components/FormGroupInput/FormGroupInput.js b/src/js/ui/react/components/FormGroupInput/FormGroupInput.js index cf289a72..59eabf70 100644 --- a/src/js/ui/react/components/FormGroupInput/FormGroupInput.js +++ b/src/js/ui/react/components/FormGroupInput/FormGroupInput.js @@ -15,6 +15,7 @@ import PropTypes from 'prop-types'; class FormGroup extends React.Component { static propTypes = { + autoComplete: PropTypes.string, enabled: PropTypes.bool, id: PropTypes.string.isRequired, label: PropTypes.string.isRequired, @@ -34,9 +35,9 @@ class FormGroup extends React.Component { }; static defaultProps = { + autoComplete: 'new-password', // This will prevent the browsers to autoComplete the input. enabled: true, - onChanged: () => { - }, + onChanged: () => {}, placeholder: '', required: false, type: 'text', @@ -90,6 +91,7 @@ class FormGroup extends React.Component { render() { const { + autoComplete, enabled, id, label, @@ -116,7 +118,7 @@ class FormGroup extends React.Component {