diff --git a/src/Components/Input/TextInput.tsx b/src/Components/Input/TextInput.tsx index 0ab98c15..54217e7c 100644 --- a/src/Components/Input/TextInput.tsx +++ b/src/Components/Input/TextInput.tsx @@ -13,6 +13,8 @@ type InputTextProps = { defaultValue?: string placeholder?: string autocomplete?: string + pattern?: string + required?: boolean updateFormValue?: (value: string) => void } @@ -26,6 +28,8 @@ export function TextInput({ defaultValue, placeholder, autocomplete, + pattern, + required = true, updateFormValue, }: InputTextProps) { const [inputValue, setInputValue] = useState(defaultValue || '') @@ -50,7 +54,8 @@ export function TextInput({ ) : null} -
- +
{ + e.preventDefault() + void onUpdateItem( + state, + item, + tags, + addTag, + setLoading, + navigate, + updateItem, + addItem, + user, + urlParams, + ) + }} + > +
+ - {template === 'onepager' && ( - - )} + {template === 'onepager' && ( + + )} - {template === 'simple' && } + {template === 'simple' && } - {template === 'flex' && ( - - )} + {template === 'flex' && ( + + )} - {template === 'tabs' && ( - linkItem(id, item, updateItem)} - unlinkItem={(id) => unlinkItem(id, item, updateItem)} - setUrlParams={setUrlParams} - > - )} + {template === 'tabs' && ( + linkItem(id, item, updateItem)} + unlinkItem={(id) => unlinkItem(id, item, updateItem)} + setUrlParams={setUrlParams} + > + )} -
- +
+ +
-
+
) diff --git a/src/Components/Profile/Subcomponents/ContactInfoForm.tsx b/src/Components/Profile/Subcomponents/ContactInfoForm.tsx index 9a87fc6a..ed5cea1e 100644 --- a/src/Components/Profile/Subcomponents/ContactInfoForm.tsx +++ b/src/Components/Profile/Subcomponents/ContactInfoForm.tsx @@ -22,6 +22,7 @@ export const ContactInfoForm = ({ setState((prevState) => ({ @@ -41,6 +42,9 @@ export const ContactInfoForm = ({ setState((prevState) => ({ diff --git a/src/Components/Profile/Subcomponents/FormHeader.tsx b/src/Components/Profile/Subcomponents/FormHeader.tsx index a20a778f..357ad7a4 100644 --- a/src/Components/Profile/Subcomponents/FormHeader.tsx +++ b/src/Components/Profile/Subcomponents/FormHeader.tsx @@ -44,6 +44,7 @@ export const FormHeader = ({ item, state, setState }) => { /> setState((prevState) => ({