Skip to content

Commit aac55bf

Browse files
committed
Adding a data-model system for sync'ing data between parent and child components
This also includes the dispatching of several new PHP events. Documenting hooks + minor items
1 parent fd97102 commit aac55bf

38 files changed

+2193
-1104
lines changed

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@
5050
"@typescript-eslint/no-explicit-any": "off",
5151
"@typescript-eslint/no-empty-function": "off",
5252
"@typescript-eslint/ban-ts-comment": "off",
53-
"quotes": ["error", "single"]
53+
"quotes": [
54+
"error",
55+
"single"
56+
]
5457
},
5558
"env": {
5659
"browser": true

src/Cropperjs/Resources/assets/test/controller.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ describe('CropperjsController', () => {
5252
data-cropperjs-public-url-value="https://symfony.com/logos/symfony_black_02.png"
5353
data-cropperjs-options-value="${dataToJsonAttribute({
5454
viewMode: 1,
55-
dragMode: "move"
55+
dragMode: 'move'
5656
})}"
5757
>
5858
</div>

src/LiveComponent/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@
2828
2929
- [BEHAVIOR CHANGE] The way that child components re-render when a parent re-renders
3030
has changed, but shouldn't be drastically different. Child components will now
31-
avoid re-rendering if no "input" to the component changed *and* will maintain
31+
avoid re-rendering if no "input" to the component changed _and_ will maintain
3232
any writable `LiveProp` values after the re-render. Also, the re-render happens
3333
in a separate Ajax call after the parent has finished re-rendering.
3434
3535
- [BEHAVIOR CHANGE] If a model is updated, but the new value is equal to the old
3636
one, a re-render will now be avoided.
3737
3838
- [BC BREAK] The `live:update-model` and `live:render` events are not longer
39-
dispatched. You can now use the hook system directly on the `Component` object.
39+
dispatched. You can now use the "hook" system directly on the `Component` object/
4040
4141
- [BC BREAK] The `LiveComponentHydrator::dehydrate()` method now returns a
4242
`DehydratedComponent` object.

0 commit comments

Comments
 (0)