-
Notifications
You must be signed in to change notification settings - Fork 44
Description
When initialising finder using an async function rather than static array, the "go-to" event does not work.
The following error is seen in the console:
TypeError: n.find is not a function at Function.finder.selectPath (vendor/finder.min.js)
This is because finder.selectPath is passed the original "data" and expects this to be an array, calling data.find to get the path. However, in this case data is a function and the above error occurs.
I know that go-to may not be possible to find a path which hasn't been retrieved by the async function (and defaultPath wouldn't work at all for the same reason). However, in my case I am emitting go-to to navigate to a path that I know is in the data that already exists in the tree.
What I really want to do is automatically select the top-level child if there is only a single top-level child after building the tree in the async function. Is there a way to do this?
Thanks,
Giles