Closed spo0okie closed 1 year ago
master
When I follow those steps, I see... pagesize of 10 (as default set in module settings)
I was expecting... pagesize of 100 (as set in dataprovider) because default settings must not override customized
Problem is isolated in widget initialization (initWidget(), DynaGrid.php, row 619):
if (!isset($this->_pageSize) || $this->_pageSize === null) { $this->_pageSize = $this->_module->defaultPageSize; }
no $dataProvider attrs used. and next in row 637
$this->applyGridConfig();
then in row 776
$this->applyPageSize();
which finaly override $dataProvider pagination with new (simply default value) pageSize
i think it must be first attempt to read pageSize from $dataProvider in rows 619-621 and then use of defaultPageSize as fallback (if no custom value is set)
Prerequisites
master
branch of yii2-dynagrid.Steps to reproduce the issue
Expected behavior and actual behavior
When I follow those steps, I see... pagesize of 10 (as default set in module settings)
I was expecting... pagesize of 100 (as set in dataprovider) because default settings must not override customized
Environment
Browsers
Operating System
Libraries
Isolating the problem
Problem is isolated in widget initialization (initWidget(), DynaGrid.php, row 619):
no $dataProvider attrs used. and next in row 637
then in row 776
which finaly override $dataProvider pagination with new (simply default value) pageSize
i think it must be first attempt to read pageSize from $dataProvider in rows 619-621 and then use of defaultPageSize as fallback (if no custom value is set)