refactor: Add default type to some form inputs

This commit is contained in:
haitaoo 2023-07-03 17:08:25 +08:00
parent 61a60499ae
commit a96f73a95e
3 changed files with 5 additions and 0 deletions

View File

@ -201,6 +201,7 @@ const useTagModal = (props: IProps = {}) => {
<Form.Group controlId="displayName" className="mb-3">
<Form.Label>{t('form.fields.display_name.label')}</Form.Label>
<Form.Control
type="text"
value={formData.displayName.value}
onChange={handleDisplayNameChange}
isInvalid={formData.displayName.isInvalid}
@ -212,6 +213,7 @@ const useTagModal = (props: IProps = {}) => {
<Form.Group controlId="slugName" className="mb-3">
<Form.Label>{t('form.fields.slug_name.label')}</Form.Label>
<Form.Control
type="text"
value={formData.slugName.value}
onChange={handleSlugNameChange}
isInvalid={formData.slugName.isInvalid}

View File

@ -347,6 +347,7 @@ const Ask = () => {
<Form.Group controlId="title" className="mb-3">
<Form.Label>{t('form.fields.title.label')}</Form.Label>
<Form.Control
type="text"
value={formData.title.value}
isInvalid={formData.title.isInvalid}
onChange={handleTitleChange}

View File

@ -147,6 +147,7 @@ const Index = () => {
<Form.Group controlId="display_name" className="mb-3">
<Form.Label>{t('form.fields.display_name.label')}</Form.Label>
<Form.Control
type="text"
value={formData.displayName.value}
isInvalid={formData.displayName.isInvalid}
disabled={role_id !== 2 && role_id !== 3}
@ -160,6 +161,7 @@ const Index = () => {
<Form.Group controlId="slug_name" className="mb-3">
<Form.Label>{t('form.fields.slug_name.label')}</Form.Label>
<Form.Control
type="text"
value={formData.slugName.value}
isInvalid={formData.slugName.isInvalid}
disabled={role_id !== 2 && role_id !== 3}