v4.0.1
If I create a table i Flex mode it will create for the current screen size with Horizontal scroll if wider than screen.
If you then change the viewport width the scrollbar doesn't necessarily adjust to fit. If you change to wider the scroll increases to match. If you change to narrower the scroll does not adjust and you loose the right scroll arrow.
If the screen was initially wide enough to not require a scroll and you narrow it, the scroll does not appear and you can't access the right side of the table.
Real use case like when using a tablet and you change between landscape and portrait and vice a versa.
Setup is
height: 'flex',
width: 'flex',
flex:{on: true},
maxWidth: '100%',
And event handler as per your demo
pq.grid("#grid", obj)
.on("refresh refreshCell", function (evt, ui) {
if (ui.source != 'flex') {
this.flex();
}
});