Open hohnacker opened 4 years ago
I will check it today.
Yes, this problem is confirmed by my experiments.
The problem exists in yii.gridView.js
file in initEventHandler
function. This function and and structure gridEventHandlers
object designed to store only one type of event for one grid view. Theoretically this can create other problems besides this problem with checkboxes. I already started work to fix this issue.
What steps will reproduce the problem?
What is the expected result?
"Check all" functionality per Column Header
What do you get instead?
If I click on the first header checkbox no checkbox is checked automatically. The last columns work. It seems that always the last one wins.
I think the issue is in https://github.com/yiisoft/yii2/blob/master/framework/assets/yii.gridView.js #194 setSelectionColumn is called twice for each column. initEventHandler is called for both columns, but both with the same type name "checkAllRows". If we change checkAllRows with the column spezific name it would work.
Additional info