Skip to content

Commit

Permalink
add missing build files
Browse files Browse the repository at this point in the history
  • Loading branch information
WebMamba committed Nov 22, 2023
1 parent 317d390 commit d5fc3c3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/LiveComponent/assets/dist/Component/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default class Component {
emitSelf(name: string, data: any): void;
private performEmit;
private doEmit;
updateFromNewElementFromParentRender(toEl: HTMLElement): void;
updateFromNewElementFromParentRender(toEl: HTMLElement): boolean;
onChildComponentModelUpdate(modelName: string, value: any, childComponent: Component): void;
private isTurboEnabled;
private tryStartingRequest;
Expand Down
3 changes: 2 additions & 1 deletion src/LiveComponent/assets/dist/live_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -1912,7 +1912,7 @@ class Component {
updateFromNewElementFromParentRender(toEl) {
const props = this.elementDriver.getComponentProps(toEl);
if (props === null) {
return;
return false;
}
const isChanged = this.valueStore.storeNewPropsFromParent(props);
const fingerprint = toEl.dataset.liveFingerprintValue;
Expand All @@ -1922,6 +1922,7 @@ class Component {
if (isChanged) {
this.render();
}
return isChanged;
}
onChildComponentModelUpdate(modelName, value, childComponent) {
if (!childComponent.id) {
Expand Down
6 changes: 4 additions & 2 deletions src/LiveComponent/assets/src/Component/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,13 @@ export default class Component {
*
* @param toEl
*/
updateFromNewElementFromParentRender(toEl: HTMLElement): void {
updateFromNewElementFromParentRender(toEl: HTMLElement): boolean {
const props = this.elementDriver.getComponentProps(toEl);

// if no props are on the element, use the existing element completely
// this means the parent is signaling that the child does not need to be re-rendered
if (props === null) {
return;
return false;
}

// push props directly down onto the value store
Expand All @@ -305,6 +305,8 @@ export default class Component {
if (isChanged) {
this.render();
}

return isChanged;
}

/**
Expand Down

0 comments on commit d5fc3c3

Please sign in to comment.