Access shared value of scrollY in Scrollables
See original GitHub issueAsk your Question
Is there a way to access the scrollY value of BottomSheetScrollView
so I can animate other elements while the user scrolls? If so, how can I achieve this?
In v3 I was able to achieve this by setting value in onScroll prop which is not accessible anymore.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:5
Top Results From Across the Web
How can I get the scrollbar position with JavaScript?
scrollTop - is the pixels hidden in top due to the scroll. With no scroll its value is 0. element.scrollHeight - is the...
Read more >4 Ways to Listen to Page Scrolling for Dynamic UI in Angular ft ...
First, we create a BehaviourSubject to store the scrollY position. Additionally, we create an observable from the scrollY BehaviorSubject, to ...
Read more >Scrollable element is keyboard accessible[proposed] | ACT Rule
Description. This rule checks that scrollable elements can be scrolled by keyboard. Applicability. This rule applies to any HTML element that has visible ......
Read more >Scrollable element is keyboard accessible
A scrollable element is an element with a horizontal scroll distance or a vertical scroll distance greater than 0. horizontal scroll distance: ...
Read more >Access scrollbar.value not possible through code? - Unity Forum
This position is controlled by Scrollbar.value , but it seems i can't access it through code. I tried both Awake(), Start() and OnEnable() ......
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
@mohandere sorry for the late response. I was able to access scrollY by customizing scrollEventsHandlersHook. My solution is not perfect but works for now if anyone has an idea how this can be achieved in a better way let us know, please.
Solution: I copied useScrollEventsHandlersDefault to my repository and renamed it to
useCustomScrollEventsHandlers
also added third argumentscrollY
, than I added this block of code tohandleOnScroll
callbackafter that, you can use it in a bottom sheet like this
just spotted a bug in my implementation. 🙈 I had sticky header animation styles applied on scrollY but after I called
bottomSheetRef.current?.collapse()
when still scrolled and then expanded bottom sheet back to full height, header animated styles were still applied.It looks that I was able to fix it by adding
to handleOnScroll callback