@@ -28,7 +28,7 @@ const EmojiPicker = forwardRef((props, ref) => {
2828 vertical : 0 ,
2929 } ) ;
3030 const [ reportAction , setReportAction ] = useState ( { } ) ;
31- const emojiPopoverAnchorOrigin = useRef ( DEFAULT_ANCHOR_ORIGIN ) ;
31+ const [ emojiPopoverAnchorOrigin , setEmojiPopoverAnchorOrigin ] = useState ( DEFAULT_ANCHOR_ORIGIN ) ;
3232 const emojiPopoverAnchor = useRef ( null ) ;
3333 const onModalHide = useRef ( ( ) => { } ) ;
3434 const onEmojiSelected = useRef ( ( ) => { } ) ;
@@ -58,7 +58,7 @@ const EmojiPicker = forwardRef((props, ref) => {
5858 onWillShow ( ) ;
5959 setIsEmojiPickerVisible ( true ) ;
6060 setEmojiPopoverAnchorPosition ( value ) ;
61- emojiPopoverAnchorOrigin . current = anchorOrigin || DEFAULT_ANCHOR_ORIGIN ;
61+ setEmojiPopoverAnchorOrigin ( anchorOrigin || DEFAULT_ANCHOR_ORIGIN ) ;
6262 setReportAction ( reportActionValue ) ;
6363 } ) ;
6464 } ;
@@ -161,7 +161,7 @@ const EmojiPicker = forwardRef((props, ref) => {
161161 width : CONST . EMOJI_PICKER_SIZE . WIDTH ,
162162 height : CONST . EMOJI_PICKER_SIZE . HEIGHT ,
163163 } }
164- anchorAlignment = { emojiPopoverAnchorOrigin . current }
164+ anchorAlignment = { emojiPopoverAnchorOrigin }
165165 outerStyle = { StyleUtils . getOuterModalStyle ( props . windowHeight , props . viewportOffsetTop ) }
166166 innerContainerStyle = { styles . popoverInnerContainer }
167167 avoidKeyboard
0 commit comments