UX: scroll row to top of container in select-kit (#15230)

This commit is contained in:
Joffrey JAFFEUX 2021-12-08 12:22:18 +01:00 committed by GitHub
parent f799b8bfb1
commit a144f49ec2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -714,7 +714,7 @@ export default Component.extend(
rowContainer = this.element.querySelector(".select-kit-row.is-none");
}
rowContainer && rowContainer.focus({ preventScroll });
rowContainer?.focus({ preventScroll });
},
_highlightLast() {
@ -989,7 +989,7 @@ export default Component.extend(
}
if (highlighted) {
this._scrollToRow(highlighted);
this._scrollToRow(highlighted, false);
this.set("selectKit.highlighted", highlighted);
}
}