简体   繁体   中英

How to flip the dropdown (Popover) uisng popper js

In my application am showing dropdown(Popover) from button left side. If button is in browser right edge. I want to show button right edge to left edge .can anybody tell how to flip in popper js

Thanks

You can try something like this:

var popper = new Popper(referenceElement, onLeftPopper, {
    placement: 'right',
    modifiers: {
        flip: {
            behavior: ['right', 'left']
        },
        preventOverflow: {
            boundariesElement: container,
        },
    },
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM