Skip to content
This repository was archived by the owner on May 25, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const Input = ({ id, value, modifyFormObject, formObject, onSave, autoSave, onBl
const label = rest['ui:label'] || '';
const maxLength = rest['ui:maxLength'] || 256;
const size = rest['ui:size'] || 40;
const pattern = rest['ui:pattern'] || '';
const actualValue = formObject[id] || formObject[id] === '' ? formObject[id].value : value;
const onChange = ({ target }) => {
const obj = { value: target.value, ...rest };
Expand All @@ -26,6 +27,7 @@ const Input = ({ id, value, modifyFormObject, formObject, onSave, autoSave, onBl
id={id}
name={id}
type={InputTextTypes[type]}
pattern={pattern}
{...{ maxLength, size, value: actualValue || '', onChange, onBlur }}
/>
</InputGroup>
Expand Down
6 changes: 6 additions & 0 deletions src/lib/components/FormModel/children/Form/UI/ui-mapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ const UIMapping = type => {
case UITypes.ColorField:
component = ColorPicker;
break;
case UITypes.EmailField:
component = Input;
break;
case UITypes.PhoneField:
component = Input;
break;
default:
component = Input;
}
Expand Down