From c97ea31da2bd5a21f494b11150272fe6e0902894 Mon Sep 17 00:00:00 2001 From: Trey Huffine Date: Mon, 22 May 2017 17:52:10 -0700 Subject: [PATCH] Autocomplete is allowed and defaults to off --- package.json | 2 +- src/filter-input-attributes.js | 1 + src/input.jsx | 4 ++-- src/prop-types.js | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index af8ae6aa..f6e6f640 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-geosuggest", - "version": "2.1.0", + "version": "2.1.1", "description": "A React autosuggest for the Google Maps Places API.", "main": "module/Geosuggest.js", "author": "Robert Katzki ", diff --git a/src/filter-input-attributes.js b/src/filter-input-attributes.js index ea2c4dc6..8c716288 100644 --- a/src/filter-input-attributes.js +++ b/src/filter-input-attributes.js @@ -3,6 +3,7 @@ */ const allowedAttributes = [ 'autoFocus', + 'autoComplete', 'disabled', 'form', 'formAction', diff --git a/src/input.jsx b/src/input.jsx index 1a74372b..78a09d5e 100644 --- a/src/input.jsx +++ b/src/input.jsx @@ -112,7 +112,6 @@ class Input extends React.Component { return {}, - onKeyPress: () => {} + onKeyPress: () => {}, + autoComplete: 'off' }; export default Input; diff --git a/src/prop-types.js b/src/prop-types.js index d0c1eac7..c6f3e7f7 100644 --- a/src/prop-types.js +++ b/src/prop-types.js @@ -38,5 +38,6 @@ export default { suggestItem: React.PropTypes.object }), ignoreTab: React.PropTypes.bool, - label: React.PropTypes.string + label: React.PropTypes.string, + autoComplete: React.PropTypes.string };