mirror of
https://github.com/zadam/trilium.git
synced 2025-10-28 18:18:55 +01:00
chore(react/collections): full-height rendering for non-legacy
This commit is contained in:
parent
c49e84efc6
commit
cc7edbe3a7
@ -17,9 +17,10 @@ export default function NoteList({ note: providedNote, highlightedTokens }: Note
|
||||
const viewType = useNoteViewType(note);
|
||||
const noteIds = useNoteIds(note, viewType);
|
||||
const isEnabled = (note && !!viewType);
|
||||
const isFullHeight = (viewType !== "list" && viewType !== "grid");
|
||||
|
||||
return (
|
||||
<div className="note-list-widget">
|
||||
<div className={`note-list-widget ${isFullHeight ? "full-height" : ""}`}>
|
||||
{isEnabled && (
|
||||
<div className="note-list-widget-content">
|
||||
{getComponentByViewType(note, noteIds, viewType, highlightedTokens)}
|
||||
|
||||
@ -17,16 +17,6 @@ export default class NoteListRenderer {
|
||||
this.viewType = this.#getViewType(args.parentNote);
|
||||
}
|
||||
|
||||
get isFullHeight() {
|
||||
switch (this.viewType) {
|
||||
case "list":
|
||||
case "grid":
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
async renderList() {
|
||||
const args = this.args;
|
||||
const viewMode = this.#buildViewMode(args);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user