Page MenuHomePhabricator

[native] Forward `searchInputRef` from `ChatThreadList` to `ChatThreadListSearch`
ClosedPublic

Authored by atul on Sep 14 2023, 2:05 PM.
Tags
None
Referenced Files
F2191484: D9209.id31223.diff
Thu, Jul 4, 3:50 PM
Unknown Object (File)
Tue, Jul 2, 10:54 PM
Unknown Object (File)
Tue, Jul 2, 1:30 PM
Unknown Object (File)
Tue, Jul 2, 9:13 AM
Unknown Object (File)
Mon, Jul 1, 8:17 PM
Unknown Object (File)
Thu, Jun 20, 3:06 AM
Unknown Object (File)
Tue, Jun 18, 7:18 AM
Unknown Object (File)
Thu, Jun 13, 12:14 PM
Subscribers

Details

Summary

Forward ref from ChatThreadList to ChatThreadListSearch... which will in turn forward it to the inner Search component.


Depends on D9208

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

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul published this revision for review.Sep 14 2023, 2:06 PM
tomek added inline comments.
native/chat/chat-thread-list-search.react.js
81 ↗(On Diff #31155)

Why this ref was defined here and used only as a prop?

native/chat/chat-thread-list.react.js
356 ↗(On Diff #31155)

Are we sure that we're rendering at most one instance of this component? I'm wondering if using the same ref for two instances can cause some issues.

This revision is now accepted and ready to land.Sep 18 2023, 4:13 AM
native/chat/chat-thread-list-search.react.js
81 ↗(On Diff #31155)

This was temporary to appease flow, etc. What we really want to do (and do in this diff) is forward ref from ChatThreadList down to the inner Search component.

native/chat/chat-thread-list.react.js
356 ↗(On Diff #31155)

I believe it should be fine. This matches how things were previously.