diff --git a/compiler/src/process_component_build.ts b/compiler/src/process_component_build.ts index 421f601..4e2a765 100644 --- a/compiler/src/process_component_build.ts +++ b/compiler/src/process_component_build.ts @@ -1035,10 +1035,10 @@ function addForEachIdFuncParameter(argumentsArray: ts.Expression[]): ts.Identifi ts.factory.createIdentifier(ELMTID), ts.factory.createIdentifier(argumentsArray[0] && argumentsArray[0].getText()) ); + addForEachIdFuncParameterArr.push(ts.factory.createIdentifier(FOREACHITEMGENFUNCTION)); if (argumentsArray[2]) { addForEachIdFuncParameterArr.push(ts.factory.createIdentifier(FOREACHITEMIDFUNC)); } - addForEachIdFuncParameterArr.push(ts.factory.createIdentifier(FOREACHITEMGENFUNCTION)); return addForEachIdFuncParameterArr; } diff --git a/compiler/test/utForPartialUpdate/inner_component_transform/render_component/foreach/foreach.ts b/compiler/test/utForPartialUpdate/inner_component_transform/render_component/foreach/foreach.ts index 77c2288..b40e21e 100644 --- a/compiler/test/utForPartialUpdate/inner_component_transform/render_component/foreach/foreach.ts +++ b/compiler/test/utForPartialUpdate/inner_component_transform/render_component/foreach/foreach.ts @@ -81,7 +81,7 @@ exports.expectResult = Text.pop(); }; const forEachItemIdFunc = item => item.toString(); - this.forEachUpdateFunction(elmtId, this.arr, forEachItemIdFunc, forEachItemGenFunction); + this.forEachUpdateFunction(elmtId, this.arr, forEachItemGenFunction, forEachItemIdFunc); if (!isInitialRender) { ForEach.pop(); } diff --git a/compiler/test/utForPartialUpdate/ui_state_management/inner_struct_state_management/@objectLink/@objectLink.ts b/compiler/test/utForPartialUpdate/ui_state_management/inner_struct_state_management/@objectLink/@objectLink.ts index d62ab55..f687eb8 100644 --- a/compiler/test/utForPartialUpdate/ui_state_management/inner_struct_state_management/@objectLink/@objectLink.ts +++ b/compiler/test/utForPartialUpdate/ui_state_management/inner_struct_state_management/@objectLink/@objectLink.ts @@ -167,7 +167,7 @@ class Parent extends ViewPU { } }; const forEachItemIdFunc = item => item.text; - this.forEachUpdateFunction(elmtId, this.models, forEachItemIdFunc, forEachItemGenFunction); + this.forEachUpdateFunction(elmtId, this.models, forEachItemGenFunction, forEachItemIdFunc); if (!isInitialRender) { ForEach.pop(); }