Commit 950b6c8
committed
bug #6872 fix: Do not override HTML attribute
This PR was merged into the 4.x branch.
Discussion
----------
fix: Do not override HTML attribute `title` if already set for Action…
If an action has no label but has the HTML attribute already set, it should not be replaced by the action name.
Use case example:
```php
$moveDown = Action::new('moveDown', false, 'fa fa-angle-down')
->setHtmlAttributes(['title' => $this->trans('Move Down')])
->linkToCrudAction('moveDown')
->displayIf(static fn(SortableEntityInterface $entity): bool => $entity->getPosition() < $entityCount - 1)
;
```
Commits
-------
4dd8bae fix: Do not override HTML attribute `title` if already set for Actions without a labeltitle if already set for Action… (jbonnier)1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| 160 | + | |
160 | 161 | | |
161 | 162 | | |
162 | | - | |
| 163 | + | |
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
| |||
0 commit comments