Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a prop that will trim whitespaces from text input value #2606

Open
arekkubaczkowski opened this issue Jul 30, 2024 · 0 comments
Open

Add a prop that will trim whitespaces from text input value #2606

arekkubaczkowski opened this issue Jul 30, 2024 · 0 comments

Comments

@arekkubaczkowski
Copy link

Motivation
I would like to request the addition of a custom prop that allows trimming whitespace from messages before they are sent. This feature will improve user experience by preventing messages from being sent accidentally with leading or trailing whitespace.

Proposed solution
To address this, I propose adding a custom prop to the message input component that enables the trimming of whitespace. When this prop is enabled, any leading or trailing whitespace in the message input should be automatically removed before the message is sent.

1.	Introduce a new boolean prop, e.g., trimWhitespace, to the message input component.
2.	When trimWhitespace is set to true, the message input should automatically trim any leading and trailing whitespace from the message before sending.
3.	Ensure that this functionality is optional and backward compatible, with the default behavior being false (no trimming).
<MessageInput
  trimWhitespace={true}
/>

Acceptance Criteria
A set of predefined requirements that must be met to mark a user story complete.

@arekkubaczkowski arekkubaczkowski changed the title Add a prop that will trim text input value whitespaces Add a prop that will trim whitespaces from text input value Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant