@@ -64,6 +64,7 @@ const Field = ({
6464 errorMessage,
6565 id,
6666 reactSelect,
67+ autocomplete,
6768} ) => {
6869 const intl = useIntl ( ) ;
6970 const Select = reactSelect . default ;
@@ -102,6 +103,7 @@ const Field = ({
102103 onChange ( name , e . target . value ) ;
103104 } }
104105 value = { value ?? '' }
106+ autoComplete = { autocomplete }
105107 />
106108 ) }
107109 { field_type === 'textarea' && (
@@ -120,6 +122,7 @@ const Field = ({
120122 onChange ( name , e . target . value ) ;
121123 } }
122124 value = { value ?? undefined }
125+ autoComplete = { autocomplete }
123126 />
124127 ) }
125128 { field_type === 'select' && (
@@ -151,6 +154,7 @@ const Field = ({
151154 classNamePrefix = "react-select"
152155 className = { isInvalid ( ) ? 'is-invalid' : '' }
153156 value = { value ? [ { value : value , label : value } ] : [ ] }
157+ autoComplete = { autocomplete }
154158 />
155159 { description && < small className = "form-text" > { description } </ small > }
156160 { errorMessage && (
@@ -286,6 +290,7 @@ const Field = ({
286290 onChange ( name , e . target . value ) ;
287291 } }
288292 value = { value ?? '' }
293+ autoComplete = { autocomplete }
289294 />
290295 ) }
291296 { field_type === 'attachment' && (
@@ -320,6 +325,7 @@ const Field = ({
320325 onChange ( name , e . target . value ) ;
321326 } }
322327 value = { value ?? '' }
328+ autoComplete = { autocomplete }
323329 />
324330 ) }
325331 { field_type === 'static_text' &&
@@ -382,6 +388,7 @@ Field.propTypes = {
382388 value : PropTypes . any ,
383389 formHasErrors : PropTypes . bool ,
384390 onChange : PropTypes . func ,
391+ autoComplete : PropTypes . string ,
385392} ;
386393
387394export default injectLazyLibs ( 'reactSelect' ) ( Field ) ;
0 commit comments