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

[material-ui][Text Field] Size & Customization #43896

Closed
ceyxasm opened this issue Sep 26, 2024 · 3 comments
Closed

[material-ui][Text Field] Size & Customization #43896

ceyxasm opened this issue Sep 26, 2024 · 3 comments
Assignees
Labels
component: text field This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material support: question Community support but can be turned into an improvement

Comments

@ceyxasm
Copy link

ceyxasm commented Sep 26, 2024

Summary

I have inputs using which I am filtering content and rendering in a TextField component. The content is however a little big and creates a big TextBox which breaks the layout.

  1. Can I set the size of the textbox so that its fixed and the content can be browsed by scrolling?
  2. Can I render all the text and highlight the selected text instead of just showing the filtered text?

Examples

I want to create an interface similar to this:
image

Motivation

  • Avoids breaking the site layout because of unpredictable inputs.
  • Avoids rerendering the entire text at each new input.

Search keywords: text field, size, customization, rerender

@ceyxasm ceyxasm added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Sep 26, 2024
@samuelsycamore samuelsycamore added the support: question Community support but can be turned into an improvement label Sep 26, 2024
@zannager zannager added the component: text field This is the name of the generic UI component, not the React module! label Sep 27, 2024
@DiegoAndai DiegoAndai changed the title Text Field Size & Customization [material-ui][Text Field] Size & Customization Oct 2, 2024
@DiegoAndai
Copy link
Member

Hey @ceyxasm, thanks for the question.

You can use the rows prop to set a specific number of rows to the text field or use maxRows to limit it: https://mui.com/material-ui/react-text-field/#multiline. Let me know if this covers your use case.

About highlighting, we don't have that functionality implemented.

@DiegoAndai DiegoAndai added status: waiting for author Issue with insufficient information package: material-ui Specific to @mui/material and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 2, 2024
@ceyxasm ceyxasm closed this as completed Oct 8, 2024
@github-actions github-actions bot removed the status: waiting for author Issue with insufficient information label Oct 8, 2024
Copy link

github-actions bot commented Oct 8, 2024

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

Note

@ceyxasm How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

@ceyxasm
Copy link
Author

ceyxasm commented Oct 8, 2024

This issue got solved. I ended up using Box component with custom formatting my text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: text field This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material support: question Community support but can be turned into an improvement
Projects
None yet
Development

No branches or pull requests

4 participants