Page MenuHomePhabricator

[native] Remove `renderSearch` in `ChatThreadList` and inline `ChatThreadListSearch` directly

Authored by atul on Thu, Sep 14, 1:41 PM.



Instead of passing a function to create ChatThreadListSearch we can inline the component directly.

As part of this we also replace additionalProps w/ more precise innerSearchAutoFocus and innerSearchActive props.

Depends on D9207

Test Plan

Search experience continues to look and work as expected. Set logs in all expected callbacks to ensure that they fired as expected. Made sure that x-icon and "Cancel" button continue to look and behave as before.

Diff Detail

rCOMM Comm
Lint Not Applicable
Tests Not Applicable

Event Timeline

atul published this revision for review.Thu, Sep 14, 1:41 PM
tomek added inline comments.
361 ↗(On Diff #31154)

We can use a shorthand

364 ↗(On Diff #31154)

We can also consider having an early return

This revision is now accepted and ready to land.Mon, Sep 18, 3:58 AM
361 ↗(On Diff #31154)

I'd prefer to be explicit here

364 ↗(On Diff #31154)

Will update to early return

address feedback: early-return