From add470fa8551d3d5bf081683ff2af6503fb38d7d Mon Sep 17 00:00:00 2001 From: Aaron George <79060613+octatau@users.noreply.github.com> Date: Thu, 29 Feb 2024 23:17:33 -0500 Subject: [PATCH] Render icons immediately after they are available --- dlrs/main/lwc/objectSelector/objectSelector.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlrs/main/lwc/objectSelector/objectSelector.js b/dlrs/main/lwc/objectSelector/objectSelector.js index a7cf6662..bb3baae7 100644 --- a/dlrs/main/lwc/objectSelector/objectSelector.js +++ b/dlrs/main/lwc/objectSelector/objectSelector.js @@ -59,9 +59,9 @@ export default class ObjectSelector extends LightningElement { t[v.result.apiName] = v.result?.themeInfo; return t; }, {}); - this.objects.forEach((o) => { + this.objects = this.objects.map((o) => { if (!objectIconCache[o.fullName]?.iconUrl) { - return; + return o; } o.iconUrl = objectIconCache[o.fullName].iconUrl; o.iconColor = `#${objectIconCache[o.fullName].color}`; @@ -74,6 +74,7 @@ export default class ObjectSelector extends LightningElement { o.iconName = `${matches[1]}:${matches[2]}`; } } + return o; }); } }