mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 12:09:02 +01:00
fix(client/search): collection rendering twice
This commit is contained in:
parent
44c379fce1
commit
e904feb179
@ -326,9 +326,11 @@ class NoteContext extends Component implements EventListener<"entitiesReloaded">
|
||||
}
|
||||
|
||||
// Collections must always display a note list, even if no children.
|
||||
const viewType = note.getLabelValue("viewType") ?? "grid";
|
||||
if (!["list", "grid"].includes(viewType)) {
|
||||
return true;
|
||||
if (note.type === "book") {
|
||||
const viewType = note.getLabelValue("viewType") ?? "grid";
|
||||
if (!["list", "grid"].includes(viewType)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!note.hasChildren()) {
|
||||
|
||||
@ -85,7 +85,7 @@ export function CustomNoteList<T extends object>({ note, isEnabled: shouldEnable
|
||||
}
|
||||
|
||||
return (
|
||||
<div ref={widgetRef} className={`note-list-widget component ${isFullHeight ? "full-height" : ""}`}>
|
||||
<div ref={widgetRef} className={`note-list-widget component ${isFullHeight && isEnabled ? "full-height" : ""}`}>
|
||||
{props && isEnabled && (
|
||||
<div className="note-list-widget-content">
|
||||
{getComponentByViewType(viewType, props)}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user