mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
[Admin] Fix product taxon grid enabled field always showing true (#18895)
| Q | A |-----------------|----- | Branch? | 2.1 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Related tickets | fixes #18633 | License | MIT The `enabled` column in the product taxon grid always displays `true` regardless of the product's actual enabled status. The grid's root entity is `ProductTaxon`, not `Product`. The `enabled` field had `path: product`, which passes the entire `Product` object to the boolean Twig template. The template does `{% if true == data %}` - any non-null object is truthy in Twig, so it always evaluates to `true`. Changed `path: product` to `path: product.enabled` to pass the actual boolean value.
This commit is contained in:
commit
a18b3e4517
1 changed files with 1 additions and 1 deletions
|
|
@ -44,7 +44,7 @@ sylius_grid:
|
|||
enabled:
|
||||
type: twig
|
||||
label: sylius.ui.enabled
|
||||
path: product
|
||||
path: product.enabled
|
||||
options:
|
||||
template: "@SyliusAdmin/shared/grid/field/boolean.html.twig"
|
||||
position:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue