@@ -28,7 +28,7 @@ const EmojiPicker = forwardRef((props, ref) => {
28
28
vertical : 0 ,
29
29
} ) ;
30
30
const [ reportAction , setReportAction ] = useState ( { } ) ;
31
- const emojiPopoverAnchorOrigin = useRef ( DEFAULT_ANCHOR_ORIGIN ) ;
31
+ const [ emojiPopoverAnchorOrigin , setEmojiPopoverAnchorOrigin ] = useState ( DEFAULT_ANCHOR_ORIGIN ) ;
32
32
const emojiPopoverAnchor = useRef ( null ) ;
33
33
const onModalHide = useRef ( ( ) => { } ) ;
34
34
const onEmojiSelected = useRef ( ( ) => { } ) ;
@@ -58,7 +58,7 @@ const EmojiPicker = forwardRef((props, ref) => {
58
58
onWillShow ( ) ;
59
59
setIsEmojiPickerVisible ( true ) ;
60
60
setEmojiPopoverAnchorPosition ( value ) ;
61
- emojiPopoverAnchorOrigin . current = anchorOrigin || DEFAULT_ANCHOR_ORIGIN ;
61
+ setEmojiPopoverAnchorOrigin ( anchorOrigin || DEFAULT_ANCHOR_ORIGIN ) ;
62
62
setReportAction ( reportActionValue ) ;
63
63
} ) ;
64
64
} ;
@@ -161,7 +161,7 @@ const EmojiPicker = forwardRef((props, ref) => {
161
161
width : CONST . EMOJI_PICKER_SIZE . WIDTH ,
162
162
height : CONST . EMOJI_PICKER_SIZE . HEIGHT ,
163
163
} }
164
- anchorAlignment = { emojiPopoverAnchorOrigin . current }
164
+ anchorAlignment = { emojiPopoverAnchorOrigin }
165
165
outerStyle = { StyleUtils . getOuterModalStyle ( props . windowHeight , props . viewportOffsetTop ) }
166
166
innerContainerStyle = { styles . popoverInnerContainer }
167
167
avoidKeyboard
0 commit comments