mirror of
https://github.com/mvvasilev/findtheti.me.git
synced 2025-04-19 13:39:52 +03:00
Limit input size for title and description, and make title wrap
This commit is contained in:
parent
446103e952
commit
39ed7d8932
2 changed files with 11 additions and 1 deletions
|
@ -199,7 +199,7 @@ export default function ExistingEventPage() {
|
||||||
<Typography>You've been invited to...</Typography>
|
<Typography>You've been invited to...</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid xs={12}>
|
<Grid xs={12}>
|
||||||
<Typography variant="h4">{ event.name }</Typography>
|
<Typography variant="h4" sx={{ wordBreak: "break-word" }} noWrap={false}>{ event.name }</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
{
|
{
|
||||||
(event.description !== null) &&
|
(event.description !== null) &&
|
||||||
|
|
|
@ -89,6 +89,11 @@ export default function NewEventPage() {
|
||||||
sx={{ width: "100%" }}
|
sx={{ width: "100%" }}
|
||||||
value={event.name}
|
value={event.name}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
|
if (e.target.value.length > 90) {
|
||||||
|
e.preventDefault();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
event.name = e.target.value;
|
event.name = e.target.value;
|
||||||
setEvent({...event});
|
setEvent({...event});
|
||||||
}}
|
}}
|
||||||
|
@ -100,6 +105,11 @@ export default function NewEventPage() {
|
||||||
sx={{ width: "100%" }}
|
sx={{ width: "100%" }}
|
||||||
value={event.description}
|
value={event.description}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
|
if (e.target.value.length > 250) {
|
||||||
|
e.preventDefault();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
event.description = e.target.value;
|
event.description = e.target.value;
|
||||||
setEvent({...event});
|
setEvent({...event});
|
||||||
}}
|
}}
|
||||||
|
|
Loading…
Add table
Reference in a new issue