Closed Abdulrrahman closed 1 year ago
It happened because you put the scrollable <ul>
element outside ng-scrollbar
component
Here is a fixed stackblitz
Use
<ng-scrollbar style="height: 100px">
<ul tabindex="0">
<li><span>✓</span> Panda</li>
<li><span>✓</span> Unicorn</li>
<li><span>✓</span> Lion</li>
<li><span>✓</span> Panda</li>
<li><span>✓</span> Unicorn</li>
<li><span>✓</span> Lion</li>
<li><span>✓</span> Panda</li>
<li><span>✓</span> Unicorn</li>
<li><span>✓</span> Lion</li>
</ul>
</ng-scrollbar>
Or
<ng-scrollbar style="height: 100px">
<ul scrollViewport tabindex="0">
<li><span>✓</span> Panda</li>
<li><span>✓</span> Unicorn</li>
<li><span>✓</span> Lion</li>
<li><span>✓</span> Panda</li>
<li><span>✓</span> Unicorn</li>
<li><span>✓</span> Lion</li>
<li><span>✓</span> Panda</li>
<li><span>✓</span> Unicorn</li>
<li><span>✓</span> Lion</li>
</ul>
</ng-scrollbar>
thanks for your help I fixed the problem, however I still have the same issue with material mat select options the scroll doesn't follow the active option with keyboard
https://stackblitz.com/edit/angular-zerpvf?file=src/app/select-custom-trigger-example.ts
Your stackblitz didn't work!
Your stackblitz didn't work!
it should be working right now
This one is difficult, I have no idea!
Reproduction
stackblitz: https://stackblitz.com/edit/angular-sblvne?file=src/main.ts
Steps to reproduce:
Expected Behavior
What behavior were you expecting to see? to be able to scroll using keyboard
Actual Behavior
What behavior did you actually see? stuck
Environment