Keep emoji picker within screen bounds

Adds the `flip` prop to `<Overlay>`. Fixes #40
This commit is contained in:
Ivan Rodriguez 2023-03-07 23:21:32 -06:00 committed by Jeremy Kescher
parent f577764472
commit 55303adfef
No known key found for this signature in database
GPG key ID: 80A419A7A613DFA4

View file

@ -390,7 +390,7 @@ class EmojiPickerDropdown extends React.PureComponent {
/>} />}
</div> </div>
<Overlay show={active} placement={'bottom'} target={this.findTarget} popperConfig={{ strategy: 'fixed' }}> <Overlay show={active} placement={'bottom'} flip target={this.findTarget} popperConfig={{ strategy: 'fixed' }}>
{({ props, placement })=> ( {({ props, placement })=> (
<div {...props} style={{ ...props.style, width: 299 }}> <div {...props} style={{ ...props.style, width: 299 }}>
<div className={`dropdown-animation ${placement}`}> <div className={`dropdown-animation ${placement}`}>