Skip to content

Commit

Permalink
Merge pull request #29716 from ishpaul777/fix/toggle-status-select-po…
Browse files Browse the repository at this point in the history
…pover

fix: made the the status emoji selector toggle popover
  • Loading branch information
MonilBhavsar authored Oct 18, 2023
2 parents 651be71 + 7357034 commit 7b03a4d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/EmojiPicker/EmojiPickerButtonDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,18 @@ function EmojiPickerButtonDropdown(props) {
const emojiPopoverAnchor = useRef(null);
useEffect(() => EmojiPickerAction.resetEmojiPopoverAnchor, []);

const onPress = () =>
const onPress = () => {
if (EmojiPickerAction.isEmojiPickerVisible()) {
EmojiPickerAction.hideEmojiPicker();
return;
}

EmojiPickerAction.showEmojiPicker(props.onModalHide, (emoji) => props.onInputChange(emoji), emojiPopoverAnchor.current, {
horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.LEFT,
vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.TOP,
shiftVertical: 4,
});
};

return (
<Tooltip text={props.translate('reportActionCompose.emoji')}>
Expand Down
1 change: 1 addition & 0 deletions src/styles/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3669,6 +3669,7 @@ const styles = (theme: ThemeDefault) =>
paddingRight: 4,
marginBottom: 32,
alignSelf: 'flex-start',
...userSelect.userSelectNone,
},

emojiPickerButtonDropdownIcon: {
Expand Down

0 comments on commit 7b03a4d

Please sign in to comment.