Closed dericcain closed 5 years ago
Hey @dericgw really thanks for this! Can you please resolve the merge conflicts? :smile:
@anshumanv I ended up having to completely refactor the "Search" because all of the logic that once lived in the component was moved to the helpers file. Now, you have a nice, clean search class that handles everything pertaining to search. And, the lookup speeds things up when searching by ID.
It looks like a test was broken in a previous commit which was merged without a PR (that is why there are no other failed CI tests). I would imagine that this happened when react-autocomplete
was introduced because that specific test is looking for a direct child as an input an react-autocomplete
seems to wrap the input in a div.
In order to gain better performance when searching by ID, we are creating a lookup table that contains the
num
->name
when the component is instantiated. If an ID is used to search, then we reference our lookup table and return the results. This should be a really fast solution since we are performing all of the efforts up front.Closes #20
By submitting this pull request I confirm I've read and complied with the below declarations.
Add/Fix {Feature/Bug}
, notUpdate README.md
orAdd new code
.