Skip to content

Commit 937de26

Browse files
committed
Add 'props-update' event dispatching
1 parent f599fdb commit 937de26

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/Vue/assets/dist/render_controller.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ class default_1 extends Controller {
2323
this.props = shallowReactive({ ...props });
2424
watch(this.props, (props) => {
2525
this.propsValue = toRaw(props);
26+
this.dispatchEvent('props-update', {
27+
componentName: this.componentValue,
28+
props: this.props,
29+
app: this.app,
30+
});
2631
}, { flush: 'post' });
2732
}
2833
connect() {

src/Vue/assets/src/render_controller.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ export default class extends Controller<Element & { __vue_app__?: App<Element> }
6060
this.props,
6161
(props) => {
6262
this.propsValue = toRaw(props);
63+
this.dispatchEvent('props-update', {
64+
componentName: this.componentValue,
65+
props: this.props,
66+
app: this.app,
67+
});
6368
},
6469
{ flush: 'post' }
6570
);

0 commit comments

Comments
 (0)