Skip to content

Commit

Permalink
+autocomplete off in input fields
Browse files Browse the repository at this point in the history
  • Loading branch information
techoneel committed Nov 4, 2024
1 parent 5f483ca commit eb367b8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions package/components/inputs/forms/CoreEditForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export default function CoreEditForm(props) {
enableReinitialize={true}
initialValues={Array.isArray(formData) ? formData[index] : formData}
validationSchema={forms[formId]?.formValidationOb}
// validateOnMount={true} // need to check
onSubmit={props.handleSubmit}
innerRef={formRef}
>
Expand Down
2 changes: 1 addition & 1 deletion package/components/inputs/forms/CoreFormInputs.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function CoreFormInputs(props) {
handleButtonCLick,
submitLoading,
OnCancelClick,
mode,
mode
} = props;

const { config } = React.useContext(WrappidDataContext);
Expand Down
13 changes: 10 additions & 3 deletions package/utils/formUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ export function createFormFieldProps(props, type) {
OnEditClick,
editFormId,
allowEdit,
onFormFocus,
onFormFocus
} = props;

if (type === "edit") {
Expand All @@ -323,8 +323,8 @@ export function createFormFieldProps(props, type) {
styleClasses: element?.styleClasses,
...(initProps[element?.id] || {}),
};
} else
return {
} else {
let _props = {
OnEditClick : OnEditClick,
allowEdit : allowEdit,
asyncLoading: element?.asyncLoading,
Expand Down Expand Up @@ -441,6 +441,13 @@ export function createFormFieldProps(props, type) {
value : formikprops?.values ? formikprops?.values[element?.id] : "",
...(initProps[element?.id] || {}),
};

if (element?.autoComplete) {
_props.autoComplete = element?.autoComplete;
_props.inputProps.autoComplete = element?.autoComplete;
}
return _props;
}
} else {
return {
id : element?.id ? String(element?.id) : "",
Expand Down

0 comments on commit eb367b8

Please sign in to comment.