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

How to render hyperlink in MUI Autocomplete #43912

Closed
bkolubenka opened this issue Sep 28, 2024 · 3 comments
Closed

How to render hyperlink in MUI Autocomplete #43912

bkolubenka opened this issue Sep 28, 2024 · 3 comments
Labels
component: autocomplete This is the name of the generic UI component, not the React module! out of scope The problem looks valid but we won't fix it (maybe we will revisit it in the future) support: Stack Overflow Please ask the community on Stack Overflow

Comments

@bkolubenka
Copy link

bkolubenka commented Sep 28, 2024

The problem in depth
How to render hyperlink in MUI Autocomplete field? Selected option in Autocomplete must be clickable after selection on MuiInputBase, MuiAutocomplete, Material UI

image

We would like to have values clickable as below
image

Search keywords:

@github-actions github-actions bot added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Sep 28, 2024
@croraf
Copy link
Contributor

croraf commented Sep 29, 2024

Have you tried customizing the renderInput attribute of the Autocomplete element? https://mui.com/material-ui/react-autocomplete/#customization (for more support check stack-overflow https://mui.com/material-ui/getting-started/support/#stack-overflow)

@oliviertassinari oliviertassinari added the component: autocomplete This is the name of the generic UI component, not the React module! label Sep 29, 2024
@mnajdova
Copy link
Member

Considering the links are not valid elements on inputs, this means that you will need to create a custom input like component that can accept links. You need to be cautious as you can easily break the accessibility of the Autocomplete tough. You need to make sure that this new component has the same keyboard behavior as the input. And yes, you can use the renderInput callback to use the custom input element.

@mnajdova mnajdova added out of scope The problem looks valid but we won't fix it (maybe we will revisit it in the future) and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Sep 30, 2024
@mj12albert mj12albert added the support: Stack Overflow Please ask the community on Stack Overflow label Dec 4, 2024
Copy link

github-actions bot commented Dec 4, 2024

👋 Thanks for using this project!

We use GitHub issues exclusively as a bug and feature requests tracker, however, this issue appears to be a support request.

For support with Material UI please check out https://mui.com/material-ui/getting-started/support/. Thanks!

If you have a question on Stack Overflow, you are welcome to link to it here, it might help others.
If your issue is subsequently confirmed as a bug, and the report follows the issue template, it can be reopened.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: autocomplete This is the name of the generic UI component, not the React module! out of scope The problem looks valid but we won't fix it (maybe we will revisit it in the future) support: Stack Overflow Please ask the community on Stack Overflow
Projects
None yet
Development

No branches or pull requests

5 participants