From 99f98d09f2a97f308406ec35aa9ff99ff3f00449 Mon Sep 17 00:00:00 2001 From: Tiago Alves Date: Mon, 28 Oct 2019 14:54:05 +0000 Subject: [PATCH 1/3] Clean unused function deepProxy. --- platform/nativescript/util/index.js | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/platform/nativescript/util/index.js b/platform/nativescript/util/index.js index 332fbaf5..b9eb1289 100644 --- a/platform/nativescript/util/index.js +++ b/platform/nativescript/util/index.js @@ -93,25 +93,6 @@ export function after(original, thisArg, wrap) { } } -export function deepProxy(object, depth = 0) { - return new Proxy(object, { - get(target, key) { - if (key === 'toString' || key === 'valueOf') { - return () => '' - } - - if (key === Symbol.toPrimitive) { - return hint => hint - } - - if (depth > 10) { - throw new Error('deepProxy over 10 deep.') - } - return deepProxy({}, depth + 1) - } - }) -} - export function updateDevtools() { if (global.__VUE_DEVTOOLS_GLOBAL_HOOK__) { try { From aa38f65c96f4216b91bec53b1d31fcf96c7c7a85 Mon Sep 17 00:00:00 2001 From: Tiago Alves Date: Tue, 5 Nov 2019 20:00:20 +0000 Subject: [PATCH 2/3] Fixes cell recycling on iOS. --- platform/nativescript/runtime/components/list-view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/nativescript/runtime/components/list-view.js b/platform/nativescript/runtime/components/list-view.js index 1460198d..be9b6a82 100644 --- a/platform/nativescript/runtime/components/list-view.js +++ b/platform/nativescript/runtime/components/list-view.js @@ -60,7 +60,7 @@ export default { } this.$refs.listView.setAttribute( - '_itemTemplatesInternal', + 'itemTemplates', this.$templates.getKeyedTemplates() ) this.$refs.listView.setAttribute('_itemTemplateSelector', (item, index) => { From 409b478c715e9d123939d1d93b95f560fe30454e Mon Sep 17 00:00:00 2001 From: Tiago Alves Date: Tue, 5 Nov 2019 20:32:57 +0000 Subject: [PATCH 3/3] ListView `itemTemplateSelector` instead of `_itemTemplateSelector`. --- platform/nativescript/runtime/components/list-view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/nativescript/runtime/components/list-view.js b/platform/nativescript/runtime/components/list-view.js index be9b6a82..c11a1abb 100644 --- a/platform/nativescript/runtime/components/list-view.js +++ b/platform/nativescript/runtime/components/list-view.js @@ -63,7 +63,7 @@ export default { 'itemTemplates', this.$templates.getKeyedTemplates() ) - this.$refs.listView.setAttribute('_itemTemplateSelector', (item, index) => { + this.$refs.listView.setAttribute('itemTemplateSelector', (item, index) => { return this.$templates.selectorFn(this.getItemContext(item, index)) }) },