New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SM OR - multiple cell selection datatable: columnIdVar isn't update before cellSelectable method is called #171

Open
hannahmez opened this Issue Jan 12, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@hannahmez

Consider a datatable:
<o:dataTable
columnIdVar="columnIdVar">

with multi cell selection enabled:
<o:multipleCellSelection
cellIds="#{controller.selectedCells}"
cellSelectable="#{controller.isCellSelectable(row)}" />

and dynamic columns:
<o:columns
columnIndexVar="colIndex"
columnId="_#{colId}"
value="#{controller.columnIds}"
var="colId">
...
</o:columns>

Each time a button is clicked the content of the table is updated and the table is rendered.

What happens is when the number of dynamic columns doesn't change between before and after the table update, the columnIdVar isn't updated before calling the cellSelectable method (the content of the columns value doesn't matter, the bug always happens when the size of value doesn't change).
I am using columnIdVar in my cellSelectable method so it is a problem as some cells that should be selectable after the table change aren't because columnIdVar isn't relevant for the new table...

@hannahmez hannahmez changed the title from multiple cell selection datatable: columnIdVar isn't update before cellSelectable method is called to SM OR - multiple cell selection datatable: columnIdVar isn't update before cellSelectable method is called Jan 12, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment