yiisoft / yii-jquery

Yii Framework jQuery Extension
https://www.yiiframework.com/
BSD 3-Clause "New" or "Revised" License
27 stars 12 forks source link

$("#grid-id").yiiGridView('getSelectedRows') not works correctly with checkbox header #6

Closed yii-bot closed 6 years ago

yii-bot commented 6 years ago

This issue has originally been reported by @neoacevedo at https://github.com/yiisoft/yii2/issues/16238. Moved here by @samdark.


What steps will reproduce the problem?

Having a gridview with a checkbox column. Checking the checkbox header for selecting all and dumping values to console.

What is the expected result?

In console I should get an array with the values of all checkboxes.

What do you get instead?

If I check the header checkbox, I receive an empty array, but if I uncheck it, I receive all values.

Additional info

Q A
Yii version 2.0.15
PHP version 7.2.5
Operating system openSUSE Tumbleweed with Firefox 59.0.2