Skip to content

Commit ccd4e5d

Browse files
committed
[Live] Removing docs showing the proxied component
1 parent b308e21 commit ccd4e5d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/LiveComponent/assets/dist/live_controller.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2621,6 +2621,7 @@ class ComponentRegistry {
26212621
const interval = setInterval(() => {
26222622
const component = this.componentMapByElement.get(element);
26232623
if (component) {
2624+
clearInterval(interval);
26242625
resolve(component);
26252626
}
26262627
count++;

src/LiveComponent/assets/src/ComponentRegistry.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export default class {
2525
const interval = setInterval(() => {
2626
const component = this.componentMapByElement.get(element);
2727
if (component) {
28+
clearInterval(interval);
2829
resolve(component);
2930
}
3031
count++;

src/LiveComponent/doc/index.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -771,13 +771,11 @@ controller and put it around (or attached to) your root component element:
771771
toggleMode() {
772772
// e.g. set some live property called "mode" on your component
773773
this.component.set('mode', 'editing');
774-
// you can also say
775-
this.component.mode = 'editing';
774+
// then, trigger a re-render to get the fresh HTML
775+
this.component.render();
776776
777777
// or call an action
778778
this.component.action('save', { arg1: 'value1' });
779-
// you can also say:
780-
this.component.save({ arg1: 'value1'});
781779
}
782780
}
783781

0 commit comments

Comments
 (0)