mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
feat(share): expand subchildren when in folder
This commit is contained in:
parent
091ffdeb59
commit
157b4f9398
@ -19,7 +19,7 @@ const target = isExternalLink ? ` target="_blank" rel="noopener noreferrer"` : "
|
|||||||
<%
|
<%
|
||||||
const hasChildren = childNote.hasVisibleChildren();
|
const hasChildren = childNote.hasVisibleChildren();
|
||||||
const isAncestorOfActive = ancestors.some(p => p === childNote.noteId);
|
const isAncestorOfActive = ancestors.some(p => p === childNote.noteId);
|
||||||
const expandedClass = isAncestorOfActive ? " expanded" : "";
|
const expandedClass = childNote.noteId === activeNote.noteId || isAncestorOfActive ? " expanded" : "";
|
||||||
%>
|
%>
|
||||||
<li class="<% if (hasChildren) { %>submenu-<% } %>item<%= expandedClass %>">
|
<li class="<% if (hasChildren) { %>submenu-<% } %>item<%= expandedClass %>">
|
||||||
<%- include('tree_item', {note: childNote, subRoot: subRoot}) %>
|
<%- include('tree_item', {note: childNote, subRoot: subRoot}) %>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user