revealPath

fun revealPath(path: List<Int>): Boolean

Brings the node path names into view, opening every ancestor that hides it, and returns whether it was reached.

Revealing is a gesture rather than a declaration: it scrolls where it is called and leaves nothing behind, so no later pass scrolls back and where the user scrolls afterwards stands. The ancestors it opens are a change to what the tree shows, and arrive in expandedPaths like the user's own.

A node is revealed once the tree holds it, which is what an effect keyed on the data runs after: the structure a click declares reaches the tree on the composition that click triggers.

false means nothing was revealed: no tree is bound, or the structure the tree currently shows has no such node. true means the tree was asked to show it, which scrolls the pane the tree is in; a tree in no scroll pane has nowhere to scroll and is left with the node's ancestors open.

Return

whether the tree holds that node and was scrolled to it.

Parameters

path

the node to bring into view, named the way expandedPaths names one; the indices are positional, so a path held across a change of structure names whatever now stands at them.

See also