firefox-devtools / devtools-core

:rocket: Packages for Firefox DevTools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[tree] detect itemHeight

jasonLaster opened this issue · comments

The tree component assumes itemHeight will be passed in. The problem is that the height often changes and is then wrong.

It would be great if the tree could calculate the itemHeight when it mounts.

we don't have itemHeight anymore.
It was used to do some virtualization but wasn't used.
What is the original issue ?

that the heights are not accurate when you scroll because we were using the wrong value for itemHeight :)

I am pretty sure we do not set the height of elements on the Tree component.
Here's how we handle scrolling :

https://github.com/devtools-html/devtools-core/blob/57edbf8992acf55661e2b8c0faf144dd3b89c9e5/packages/devtools-components/src/tree.js#L548-L578

Closing this as INVALID, feel free to re-open it if you think I'm wrong :)