Page MenuHomePhabricator

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

Authored by atul on Sep 14 2023, 2:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 3, 9:10 AM
Unknown Object (File)
Thu, Mar 28, 8:39 PM
Unknown Object (File)
Thu, Mar 28, 8:39 PM
Unknown Object (File)
Thu, Mar 28, 8:39 PM
Unknown Object (File)
Thu, Mar 28, 8:38 PM
Unknown Object (File)
Thu, Mar 28, 8:35 PM
Unknown Object (File)
Mar 7 2024, 12:00 PM
Unknown Object (File)
Feb 18 2024, 1:39 AM
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.