File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
src/components/selectable/selectable_list Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change
1
+ ** Bug fixes**
2
+
3
+ - Fixed unvirtualized ` EuiSelectable ` s to not cause Jest/jsdom errors on active option change
Original file line number Diff line number Diff line change @@ -264,7 +264,9 @@ export class EuiSelectableList<T> extends Component<
264
264
const activeOptionId = `#${ makeOptionId ( activeOptionIndex ) } ` ;
265
265
const activeOptionEl = this . listBoxRef ?. querySelector ( activeOptionId ) ;
266
266
if ( activeOptionEl ) {
267
- activeOptionEl . scrollIntoView ( { block : 'nearest' } ) ;
267
+ // TODO: we can remove scrollIntoView's conditional chaining once jsdom stubs it
268
+ // @see https://github.com/jsdom/jsdom/issues/1695
269
+ activeOptionEl . scrollIntoView ?.( { block : 'nearest' } ) ;
268
270
}
269
271
}
270
272
}
You can’t perform that action at this time.
0 commit comments