mirror of
https://github.com/TriliumNext/Notes.git
synced 2026-05-02 10:21:09 -05:00
fix search
This commit is contained in:
@@ -187,7 +187,7 @@ class Froca {
|
||||
}
|
||||
|
||||
const branches = [...note.getBranches(), ...note.getChildBranches()];
|
||||
console.log("searchResultNoteIds", searchResultNoteIds);
|
||||
|
||||
searchResultNoteIds.forEach((resultNoteId, index) => branches.push({
|
||||
// branchId should be repeatable since sometimes we reload some notes without rerendering the tree
|
||||
branchId: "virt-" + note.noteId + '-' + resultNoteId,
|
||||
@@ -197,8 +197,6 @@ console.log("searchResultNoteIds", searchResultNoteIds);
|
||||
fromSearchNote: true
|
||||
}));
|
||||
|
||||
console.log("branches", branches);
|
||||
|
||||
// update this note with standard (parent) branches + virtual (children) branches
|
||||
this.addResp({
|
||||
notes: [note],
|
||||
|
||||
@@ -33,7 +33,7 @@ const TPL = `
|
||||
<button class="btn btn-outline-secondary search-button" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="bx bx-search"></span>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-right"></div>
|
||||
<div class="dropdown-menu dropdown-menu-left"></div>
|
||||
</div>
|
||||
<input type="text" class="form-control form-control-sm search-string" placeholder="Quick search">
|
||||
</div>
|
||||
@@ -50,7 +50,7 @@ export default class QuickSearchWidget extends BasicWidget {
|
||||
this.$dropdownToggle = this.$widget.find('.search-button');
|
||||
this.$dropdownToggle.dropdown();
|
||||
|
||||
this.$widget.find('.input-group-append').on('shown.bs.dropdown', () => this.search());
|
||||
this.$widget.find('.input-group-prepend').on('shown.bs.dropdown', () => this.search());
|
||||
|
||||
utils.bindElShortcut(this.$searchString, 'return', () => {
|
||||
if (this.$dropdownMenu.is(":visible")) {
|
||||
|
||||
@@ -41,6 +41,7 @@ export default class SearchResultWidget extends NoteContextAwareWidget {
|
||||
|
||||
doRender() {
|
||||
this.$widget = $(TPL);
|
||||
this.contentSized();
|
||||
this.$content = this.$widget.find('.search-result-widget-content');
|
||||
this.$noResults = this.$widget.find('.search-no-results');
|
||||
this.$notExecutedYet = this.$widget.find('.search-not-executed-yet');
|
||||
|
||||
Reference in New Issue
Block a user