Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

items detail form submit - undefined property #1007

Open
tonyp90 opened this issue Dec 22, 2021 · 5 comments
Open

items detail form submit - undefined property #1007

tonyp90 opened this issue Dec 22, 2021 · 5 comments

Comments

@tonyp90
Copy link

tonyp90 commented Dec 22, 2021

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
Copy link
Author

tonyp90 commented Mar 10, 2022

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

@radimvaculik
Copy link
Member

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

@tonyp90
Copy link
Author

tonyp90 commented Feb 10, 2023

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

@radimvaculik
Copy link
Member

Which another problems do you mention?

@tonyp90
Copy link
Author

tonyp90 commented Feb 10, 2023

#944
#979

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants