Follow up to #39458 - Hardcoded maxLength of 30 for display name after recent change to 40. (#39499)
This commit is contained in:
parent
5a3f942a5d
commit
eb2d1c0f2a
@ -72,6 +72,11 @@ export const Profile: React.FC<{
|
|||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
|
|
||||||
|
const maxDisplayNameLength = useAppSelector(
|
||||||
|
(state) =>
|
||||||
|
state.server.server.item?.configuration.accounts.max_display_name_length,
|
||||||
|
);
|
||||||
|
|
||||||
const handleDisplayNameChange = useCallback(
|
const handleDisplayNameChange = useCallback(
|
||||||
(e: React.ChangeEvent<HTMLInputElement>) => {
|
(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
setDisplayName(e.target.value);
|
setDisplayName(e.target.value);
|
||||||
@ -218,7 +223,7 @@ export const Profile: React.FC<{
|
|||||||
|
|
||||||
<div className='fields-group'>
|
<div className='fields-group'>
|
||||||
<TextInputField
|
<TextInputField
|
||||||
maxLength={30}
|
maxLength={maxDisplayNameLength ?? 40}
|
||||||
label={
|
label={
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='onboarding.profile.display_name'
|
id='onboarding.profile.display_name'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user