mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-07 20:39:31 +08:00
The rendering logic for data-grid cells that calculated visible cells did not take into account that a row might be hidden, and therefore had 0 height. Consequently filtering would mess up the data grid and its scroll position. This CL changes the logic to first filter for the visible rows and use that array for the rest of the scroll logic. Additionally there was a bug where the data-grid would steal focus back if you focused into it and then out to type into the filter box. This is fixed by tracking if the user's focus is or is not within the data-grid, and only trying to focus the cell after rendering if the user is within the data-grid, else we do nothing. Fixed: chromium:1177202, chromium:1177200, chromium:1176727 Change-Id: Id3e387f18b6d504b4b639254d79a447d84f7d55d Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2690330 Commit-Queue: Jack Franklin <jacktfranklin@chromium.org> Reviewed-by: Paul Lewis <aerotwist@chromium.org>