react-textarea-autocomplete icon indicating copy to clipboard operation
react-textarea-autocomplete copied to clipboard

scroll behavior not working for me

Open haveanicedavid opened this issue 4 years ago • 2 comments

Hi again! I'm having trouble getting the scroll behavior to work. I've been trying to troubleshoot but am struggling a bit.

It looks like the container HTMLDivElement being referenced to scroll (where you're setting the scrollTop) is the container div (which dropdownClassname references), however the actual overflow & scroll behavior occurs within the child ul (which the listClassName property references).

Is it possible that the dropdownRef passed to _dropdownScroll() should point to the UL which holds the list?

I can take a whack at changing it later if you'd like, but I figure you know the code better than me so it's worth asking 😄

Loving the lib. Thanks again for your help

haveanicedavid avatar Aug 13 '20 01:08 haveanicedavid

Oh, my, that code is actually rusty as hell 😅.

Can you create some repro? https://codepen.io/jukben/pen/poygeKK I tried this one, this actually works as intended I hope.

Unfortunately, I don't have much time to maintain this library. The whole codebase it's literally begging for rewrite (which won't happen).

jukben avatar Aug 13 '20 07:08 jukben

I have the similar problem. When I press down arrow keyboard, suggestion dropdown doesn't scroll, while I can scroll it with mouse (trackpad.) I resolved it by changing style of dropdown (Autocomplete).

<ReactTextareaAutocomplete
  ...
  dropdownStyle={{
    maxHeight: 100,
    overflow: "auto",
 }}
/>

jngbng avatar Dec 17 '20 12:12 jngbng