File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ import {
3333
3434export type ComposerEditorProps = NativeComposerEditorProps & {
3535 readonly draftKey ?: string | null ;
36+ /** iOS destroys a hidden native editor, so it remounts; the import lifecycle here survives. */
37+ readonly hidden ?: boolean ;
3638 readonly environmentId ?: EnvironmentId ;
3739 readonly onOpenMention ?: ( path : string ) => void ;
3840 readonly onOpenAttachment ?: ( attachment : ComposerDocumentAttachment ) => void ;
@@ -42,6 +44,7 @@ export type ComposerEditorProps = NativeComposerEditorProps & {
4244
4345export function ComposerEditor ( {
4446 draftKey,
47+ hidden,
4548 environmentId,
4649 onOpenMention,
4750 onOpenAttachment,
@@ -160,6 +163,7 @@ export function ComposerEditor({
160163 return (
161164 < >
162165 < NativeComposerEditor
166+ key = { hidden ? "hidden" : "visible" }
163167 { ...props }
164168 enterBehavior = { props . enterBehavior ?? preferredEnterBehavior }
165169 onChangeText = { changeText }
Original file line number Diff line number Diff line change @@ -855,7 +855,7 @@ export const ThreadComposer = memo(function ThreadComposer(props: ThreadComposer
855855 layout = { COMPOSER_LAYOUT_TRANSITION }
856856 >
857857 < ComposerEditor
858- key = { props . hidden ? "hidden" : "visible" }
858+ hidden = { props . hidden }
859859 draftKey = { composerDraftKey }
860860 environmentId = { props . environmentId }
861861 onOpenMention = { ( path ) => {
You can’t perform that action at this time.
0 commit comments