Skip to content

Commit

Permalink
Render icons immediately after they are available
Browse files Browse the repository at this point in the history
  • Loading branch information
octatau committed Mar 1, 2024
1 parent e703949 commit add470f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dlrs/main/lwc/objectSelector/objectSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
Expand All @@ -74,6 +74,7 @@ export default class ObjectSelector extends LightningElement {
o.iconName = `${matches[1]}:${matches[2]}`;
}
}
return o;
});
}
}
Expand Down

0 comments on commit add470f

Please sign in to comment.