demo · v140
Scoped Search
A two-pane search UI. Searching for an item in the right pane shouldn't scroll the left pane — even when the page itself is scrollable. container: 'nearest' keeps each search scoped to its own panel.
// Search a list, scroll the row into view inside *its* pane only.
const hit = items.find(...);
hit.scrollIntoView({ container: "nearest", block: "center", behavior: "smooth" });
see also
- scrollIntoView container option — feature index
- all vs nearest