Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

feat: fix search highlight (#956)

gbirman2252738242e0
diff --git a/js/app/packages/macro-entity/src/components/EntityWithEverything.tsx b/js/app/packages/macro-entity/src/components/EntityWithEverything.tsx
index d1a1613e42..0fe55ee361 100644
--- a/js/app/packages/macro-entity/src/components/EntityWithEverything.tsx
+++ b/js/app/packages/macro-entity/src/components/EntityWithEverything.tsx
@@ -528,7 +528,7 @@ export function EntityWithEverything(
}
});
- const EntityTitle = () => {
+ const EntityTitle = createMemo(() => {
if (props.entity.type === 'email') {
const isLikelyEmail = (value?: string) =>
typeof value === 'string' && value.includes('@');
@@ -770,7 +770,10 @@ export function EntityWithEverything(
'w-[20cqw]': !props.showUnrollNotifications,
}}
>
- <Show when={searchHighlightName()} fallback={props.entity.name}>
+ <Show
+ when={isSearch() && searchHighlightName()}
+ fallback={props.entity.name}
+ >
{(name) => (
<StaticMarkdown
markdown={name()}
@@ -824,7 +827,7 @@ export function EntityWithEverything(
</span>
</div>
);
- };
+ });
const draggable = createDraggable(props.entity.id, props.entity);
false && draggable;