Skip to content

Commit

Permalink
fix: trim input for polls
Browse files Browse the repository at this point in the history
  • Loading branch information
KaustubhKumar05 committed Mar 6, 2024
1 parent 4ccc77e commit 9707681
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ const AddMenu = () => {
type="text"
placeholder="Enter a name to continue"
value={title}
onChange={event => setTitle(event.target.value)}
onChange={event => setTitle(event.target.value.trimStart())}
css={{
backgroundColor: '$surface_bright',
border: '1px solid $border_default',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export const QuestionForm = ({
maxHeight: '$32',
}}
value={text}
onChange={event => setText(event.target.value)}
onChange={event => setText(event.target.value.trimStart())}
/>
<Text variant="xs" css={{ color: '$on_surface_medium', textAlign: 'end', mt: '$4' }}>
{text?.length || 0}/1024
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const OptionInputWithDelete = ({
}}
value={option?.text || ''}
key={index}
onChange={event => handleOptionTextChange(index, event.target.value)}
onChange={event => handleOptionTextChange(index, event.target.value.trimStart())}
/>
<IconButton onClick={() => removeOption(index)} css={{ bg: 'transparent', border: 'none' }}>
<TrashIcon />
Expand Down

0 comments on commit 9707681

Please sign in to comment.