From ec387cde19564d26800d46aeb51821437d4bedc1 Mon Sep 17 00:00:00 2001 From: tobiu Date: Thu, 16 Jan 2025 15:18:16 +0100 Subject: [PATCH] learneo tutorial todoList: VdomUtil.findVdomChild is not a function #6240 --- .../data/deck/learnneo/pages/tutorials/TodoList.md | 2 +- .../deck/training/pages/2023-02-05T17-44-53-815Z.md | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/resources/data/deck/learnneo/pages/tutorials/TodoList.md b/resources/data/deck/learnneo/pages/tutorials/TodoList.md index a19b26623..c4a791bdb 100644 --- a/resources/data/deck/learnneo/pages/tutorials/TodoList.md +++ b/resources/data/deck/learnneo/pages/tutorials/TodoList.md @@ -91,7 +91,7 @@ class MainComponent extends Component { let me = this, cls = ['far', 'fa-square'], oldCls = ['fa', 'fa-check'], - node = VdomUtil.findVdomChild(me.vdom, data.path[0].id).vdom; + node = VdomUtil.find(me.vdom, data.path[0].id).vdom; if (data.path[0].cls.includes('fa-square')) { cls = ['fa', 'fa-check']; diff --git a/resources/data/deck/training/pages/2023-02-05T17-44-53-815Z.md b/resources/data/deck/training/pages/2023-02-05T17-44-53-815Z.md index ae83b2d40..0b5f5ea3f 100644 --- a/resources/data/deck/training/pages/2023-02-05T17-44-53-815Z.md +++ b/resources/data/deck/training/pages/2023-02-05T17-44-53-815Z.md @@ -77,7 +77,7 @@ Use the utility method, replacing the statement referencing the vdom hierarchy.
     view.vdom.cn[0].innerHTML = business.title;
-    Neo.util.VDom.findVdomChild(view.vdom, 'title').vdom.innerHTML = business.title;
+    Neo.util.VDom.find(view.vdom, 'title').vdom.innerHTML = business.title;
 
@@ -86,17 +86,17 @@ calling the function. Code a new class member. - findVdomChild = Neo.util.VDom.findVdomChild + find = Neo.util.VDom.find Then use it in the after set method. Here's how that part of the code will look afterwards.
-findVdomChild = Neo.util.VDom.findVdomChild;
+find = Neo.util.VDom.find;
 
 afterSetBusiness(business){
     if (!business) return;
     const view = this.getReference('view');
-    this.findVdomChild(view.vdom, 'title').vdom.innerHTML = business.title;
+    this.find(view.vdom, 'title').vdom.innerHTML = business.title;
     view.update();
 }
 
@@ -129,7 +129,7 @@ Then back in the details view, update the vdom as follows. Then modify the `afterSetBusiness()` method to update the element's `src`. - this.findVdomChild(view.vdom, 'thumbnail').vdom.src = business.imageUrl; + this.find(view.vdom, 'thumbnail').vdom.src = business.imageUrl; ??Add the address @@ -184,7 +184,7 @@ of thought and try it. If you get stuck, that code is given in the next lab step Here's one way to code it. How does this compare to your solution? - this.findVdomChild(view.vdom, 'address').vdom.cn = business + this.find(view.vdom, 'address').vdom.cn = business .address .map(item => ({tag: 'div', innerHTML: item}));