[AutoComplete] How to add scroll bar inside the render tags
See original GitHub issue- The issue is present in the latest release.
- I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
How to add scroll bar inside the autocomplet to avoid too many lines as here:
That question was posted in stack-overflow but had no answers https://stackoverflow.com/questions/59917803/how-to-reduce-the-height-of-autocomplete-component-of-material-ui
(when I added maxWidth and overflow auto it broke the limit tag
and broke the location of the search icon
)
Expected Behavior 🤔
Add scrolling option
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
[AutoComplete] How to add scroll bar inside the render tags
The issue is present in the latest release. I have searched the issues of this repository and believe that this is not a...
Read more >I am trying to add a custom scrollbar component to my list of ...
A possible way to solve this problem is by styling the default tag used by MUI Autocomplete list component box.
Read more >Add scroll event to jquery ui autocomplete - JSFiddle
1. <div class="ui-widget"> ; 2. <label for="tags">Tags: </label> ; 3. <input id="tags" /> ; 4. </div>.
Read more >Autocomplete API - Material UI - MUI
Name Type Default
options * array
renderInput * func
autoComplete bool false
Read more >Scrollable jQuery UI Autocomplete
Scrollable jQuery UI Autocomplete Plugin for long items list. CSS max-height , overflow-y and padding-right can make scrollable list easy.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@oliviertassinari the problem was: when wrapping
renderTags
content withdiv
, this causesstartAdornment.length
to equal 1 instead of number of tags (because the tags are contained within the parentdiv
) As a result, thelimit tag
does not appear, sincemore
is not>0
(the result is negative)My solution was: Wrap the tags only on
OnOpen
Autocomplete code:
@Nishant-Pall you probably need something like this if you want to limit the tags all the time not only when it’s not focused because in the official documentation there is an example with
limitTags
property but it’s not limiting the tags when input is focused… I am limiting the tags to 1 in my example but you can adjust to your needs.