Commit 7794893
committed
bug #1288 [TwigComponent] Merge data-action in ComponentAttributes (weaverryan)
This PR was merged into the 2.x branch.
Discussion
----------
[TwigComponent] Merge data-action in ComponentAttributes
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| Issues | None that I know of
| License | MIT
If you pass `data-action` into a component & the root `attributes` has a `data-action` already thanks to `attributes.defaults`, they should be merged together. Same behavior as `data-controller`. I found this while adding a `data-action` to a component and suddenly losing my existing `data-action` from inside.
Cheers!
Commits
-------
0cafa36 [TwigComponent] Merge data-action when using ComponentAttributesFile tree
2 files changed
+23
-1
lines changed- src/TwigComponent
- src
- tests/Unit
2 files changed
+23
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
149 | 171 | | |
150 | 172 | | |
151 | 173 | | |
| |||
0 commit comments