Premium support for our pure JavaScript UI components


Post by panu »

We have a problem with Bryntum Grid when selecting row with selectionMode: row and changing a page. After page changes grid selects previously selected rowindex on next pages and causes unwanted action in our implementation because selectionChange event launches.

This same problem can be reproduced in your https://www.bryntum.com/examples/grid/paged/ demo. Adding

selectionMode { row: true, checkbox: true }

for testing purposes. When using row-click to select rows this problem happens. You can see the row flashing once during page change. But if i'm using checkbox to select row or I click outside of grid before changing a page this problem doesn't happen.

Is this intended or bug?


Post by Animal »

Yes, it is only if using checkboxes. I surmise that when the checkbox widget is recycled, it reverts to being unchecked, but it's still connected to the record, so that unchecking event gets to the selection handling which deselects the record.

Here's a ticket: https://github.com/bryntum/support/issues/5090


Post by Animal »

OK, it just seems to be configuration that you need:

preserveSelectionOnPageChange : true


Post by Animal »


Post by panu »

Preserving selection on page change is not what we want. Also this does not solve the problem where the "unselected" row keeps flashing on page change. This seems to work correctly when selecting the row from checkbox, but not when selecting by clicking the row. In our case we wouldn't like to have checkbox at all on our solution since we already have checkbox on the first column on other purposes.

Based on our tests

preserveSelectionOnPageChange : true

did not even preserve the selection when the row was selected by clicking the row.


Post by marcio »

Hi Panu,

I added that option as well in our demo and reproduced the behavior you described. Created a ticket to fix it - https://github.com/bryntum/support/issues/5097

Thanks for the report.

Best regards,
Márcio


Post by panu »

Thanks! Just want to clarify that on that same demo if you click to page 3 and further the originally selected row starts flashing. Our goal is not to preserve the selection, but also prevent the flashing when switching pages (and ecpecially when operating without checkbox).


Post by alex.l »

Thank you for your message! I've updated the ticket with this information. We'll take care of it.

All the best,
Alex


Post Reply