Skip to content

Commit

Permalink
Merge pull request #46700 from Krishna2323/krishna2323/issue/45629
Browse files Browse the repository at this point in the history
  • Loading branch information
blimpich authored Aug 6, 2024
2 parents 9aa6134 + 09de782 commit 7b8492b
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/components/EmojiPicker/EmojiPicker.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, {forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState} from 'react';
import type {ForwardedRef, RefObject} from 'react';
import {Dimensions} from 'react-native';
import type {View} from 'react-native';
import {Dimensions, View} from 'react-native';
import type {Emoji} from '@assets/emojis/types';
import FocusTrapForModal from '@components/FocusTrap/FocusTrapForModal';
import PopoverWithMeasuredContent from '@components/PopoverWithMeasuredContent';
import type {BaseTextInputRef} from '@components/TextInput/BaseTextInput/types';
import withViewportOffsetTop from '@components/withViewportOffsetTop';
Expand Down Expand Up @@ -221,11 +221,15 @@ function EmojiPicker({viewportOffsetTop}: EmojiPickerProps, ref: ForwardedRef<Em
shouldEnableNewFocusManagement
restoreFocusType={CONST.MODAL.RESTORE_FOCUS_TYPE.DELETE}
>
<EmojiPickerMenu
onEmojiSelected={selectEmoji}
activeEmoji={activeEmoji.current}
ref={(el) => (emojiSearchInput.current = el)}
/>
<FocusTrapForModal active={isEmojiPickerVisible}>
<View>
<EmojiPickerMenu
onEmojiSelected={selectEmoji}
activeEmoji={activeEmoji.current}
ref={(el) => (emojiSearchInput.current = el)}
/>
</View>
</FocusTrapForModal>
</PopoverWithMeasuredContent>
);
}
Expand Down

0 comments on commit 7b8492b

Please sign in to comment.