datagrid icon indicating copy to clipboard operation
datagrid copied to clipboard

items detail form submit - undefined property

Open tonyp90 opened this issue 3 years ago • 5 comments

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 avatar Dec 22 '21 09:12 tonyp90

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

tonyp90 avatar Mar 10 '22 14:03 tonyp90

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

radimvaculik avatar Feb 10 '23 09:02 radimvaculik

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

tonyp90 avatar Feb 10 '23 09:02 tonyp90

Which another problems do you mention?

radimvaculik avatar Feb 10 '23 09:02 radimvaculik

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

tonyp90 avatar Feb 10 '23 11:02 tonyp90