Skip to content

Commit 01a5fb5

Browse files
authored
allows for scrolling yoverflow (#507)
1 parent 5990050 commit 01a5fb5

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/components/mgt-teams-channel-picker/mgt-teams-channel-picker.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ $dropdown-item-selected-background: var(--dropdown-item-selected-background, #de
204204
font-weight: normal;
205205
color: $font-color;
206206
display: none;
207+
max-height: 346px;
208+
overflow-y: auto;
207209

208210
&.visible {
209211
display: block;

src/components/mgt-teams-channel-picker/mgt-teams-channel-picker.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,12 @@ export class MgtTeamsChannelPicker extends MgtTemplatedComponent {
452452
selected: isSelected
453453
};
454454

455+
const dropDown = this.renderRoot.querySelector('.dropdown');
456+
457+
if (dropDown.children[this._focusedIndex]) {
458+
dropDown.children[this._focusedIndex].scrollIntoView(false);
459+
}
460+
455461
return html`
456462
<div @click=${() => this.handleItemClick(itemState)} class="${classMap(classes)}">
457463
<div class="arrow">

0 commit comments

Comments
 (0)