Client - display characters limitation on textarea - fix #81

This commit is contained in:
Sam
2021-07-14 15:05:00 +02:00
parent 7cea812d8b
commit fdfd828677
21 changed files with 93 additions and 37 deletions

View File

@ -79,7 +79,7 @@ function ProfileDetail({
</p>
<p>
<span className="user-label">{t('user:Bio')}</span>:{' '}
{user.bio}
<span className="user-bio">{user.bio}</span>
</p>
<p>
{/* eslint-disable-next-line max-len */}

View File

@ -10,6 +10,7 @@ import { deleteUser, handleProfileFormSubmit } from '../../actions/user'
import { history } from '../../index'
import { languages } from '../NavBar/LanguageDropdown'
import CustomModal from '../Common/CustomModal'
import CustomTextArea from '../Common/CustomTextArea'
class ProfileEdit extends React.Component {
constructor(props, context) {
@ -198,12 +199,11 @@ class ProfileEdit extends React.Component {
<div className="form-group">
<label>
{t('user:Bio')}:
<textarea
<CustomTextArea
charLimit={200}
name="bio"
className="form-control input-lg"
maxLength="200"
value={formData.bio}
onChange={e => this.handleFormChange(e)}
defaultValue={formData.bio}
onTextChange={e => this.handleFormChange(e)}
/>
</label>
</div>