mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-06 11:09:29 +00:00
Fixed category field in part edit page not being correctly rendered
This commit is contained in:
parent
95c5ab7b8b
commit
819a8cc56d
1 changed files with 4 additions and 2 deletions
|
|
@ -111,7 +111,9 @@ class StructuralEntityType extends AbstractType
|
|||
$resolver->setDefault('help', fn(Options $options) => $this->dtoText($options['dto_value']));
|
||||
$resolver->setDefault('help_html', fn(Options $options) => $options['dto_value'] !== null);
|
||||
|
||||
$resolver->setDefault('attr', function (Options $options) {
|
||||
|
||||
//Normalize the attr to merge custom attributes
|
||||
$resolver->setNormalizer('attr', function (Options $options, $value) {
|
||||
$tmp = [
|
||||
'data-controller' => $options['controller'],
|
||||
'data-allow-add' => $options['allow_add'] ? 'true' : 'false',
|
||||
|
|
@ -121,7 +123,7 @@ class StructuralEntityType extends AbstractType
|
|||
$tmp['data-empty-message'] = $options['empty_message'];
|
||||
}
|
||||
|
||||
return $tmp;
|
||||
return array_merge($tmp, $value);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue