Skip to content

Commit

Permalink
fix(message): #RE-1336 subject size limit (#2960)
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrique committed Apr 5, 2024
1 parent b91e980 commit 90fd0d1
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import ModalSaveBeforeLeave from '~/components/Messagerie/Component/ModalSaveBef
import { useState } from 'react'
import { MuiSpacing } from '~/theme/spacing'

const subjectSizeLimit = 255
const sidebarProps = {
title: 'Editeur',
helpers: [
Expand Down Expand Up @@ -119,7 +120,7 @@ const Form = ({
rows={4}
variant="outlined"
inputProps={{
maxLength: 400,
maxLength: subjectSizeLimit,
}}
InputProps={{
endAdornment: <SubjectEndAdornment count={field.value.length} />,
Expand Down Expand Up @@ -178,7 +179,7 @@ const Form = ({

const SubjectEndAdornment = ({ count }: { count: number }) => (
<Typography fontSize={12} whiteSpace="nowrap" paddingLeft={MuiSpacing.normal} color="text.disabled">
{count} / 400
{count} / {subjectSizeLimit}
</Typography>
)

Expand Down

0 comments on commit 90fd0d1

Please sign in to comment.