mirror of
https://github.com/discourse/discourse.git
synced 2025-02-17 19:12:45 +08:00
FIX: none row doesn’t have a value, use class to target it (#14659)
This commit is contained in:
parent
020ae3e0ff
commit
d18e3a45b9
|
@ -698,9 +698,16 @@ export default Component.extend(
|
|||
|
||||
_scrollToRow(rowItem, preventScroll = true) {
|
||||
const value = this.getValue(rowItem);
|
||||
const rowContainer = this.element.querySelector(
|
||||
`.select-kit-row[data-value="${value}"]`
|
||||
);
|
||||
|
||||
let rowContainer;
|
||||
if (isPresent(value)) {
|
||||
rowContainer = this.element.querySelector(
|
||||
`.select-kit-row[data-value="${value}"]`
|
||||
);
|
||||
} else {
|
||||
rowContainer = this.element.querySelector(".select-kit-row.is-none");
|
||||
}
|
||||
|
||||
rowContainer && rowContainer.focus({ preventScroll });
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user