Skip to content

Fuzzy finder: remove usage of direct DOM manipulation

Created by: olafurpg

The following code review comment has not been followed up on https://github.com/sourcegraph/sourcegraph/pull/20921/files#r637086203

The more I look at this, the less I like this way of getting/setting the selected results, it breaks out of React to do direct DOM manipulation. I think a better way to think about this would be to create a ResultsList component that you can set the selected index on and get the selected item out of via an event. This is something I think is high priority to add to #21201 (closed) - @limitedmage

The comment is about this line here https://github.com/sourcegraph/sourcegraph/blob/41d2a8c7eb192e2a927ab5147b44bc387ee1ef58/client/web/src/components/fuzzyFinder/FuzzyModal.tsx#L126

We should either address this comment or close this as a wontfix.