contributte / datagrid

:muscle: DataGrid for Nette Framework: filtering, sorting, pagination, tree view, table view, translator, etc
https://contributte.org/packages/contributte/datagrid/
MIT License
292 stars 195 forks source link

items detail form submit - undefined property #1007

Open tonyp90 opened 2 years ago

tonyp90 commented 2 years ago

nette/forms v3.0.7, ublaboo/datagrid v6.7.6 - OK nette/forms v3.1.6, ublaboo/datagrid v6.9.2 - Undefined property: Nette\Utils\ArrayHash::$id after using $values->id:

$grid->setItemsDetailForm(function(Nette\Forms\Container $container) use ($grid, $presenter) {
    $container->addHidden('id');
    $container->addText('name');

    $container->addSubmit('save', 'Save')
        ->setValidationScope([$container])
        ->onClick[] = function($button) use ($grid, $presenter) {
            $values = $button->getParent()->getValues();
        };
});
tonyp90 commented 2 years ago

still problem with datagrid v6.9.4 fix: $values = $button->getParent()->getUnsafeValues(null);

radimvaculik commented 1 year ago

Still problem in next branch. @tonyp90 Do you know, what does cause the problem? Some changes in nette/forms?

tonyp90 commented 1 year ago

There was some changes between forms 3.0 and 3.1 which caused more problems than just this.

radimvaculik commented 1 year ago

Which another problems do you mention?

tonyp90 commented 1 year ago

https://github.com/contributte/datagrid/issues/944 https://github.com/contributte/datagrid/issues/979