mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
Merge pull request #377 from SiriusXT/find_widget
Fix a bug of find widget
This commit is contained in:
commit
b1163624ba
@ -218,6 +218,10 @@ export default class FindWidget extends NoteContextAwareWidget {
|
|||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
async findNext(direction) {
|
async findNext(direction) {
|
||||||
|
if (this.$totalFound.text()=="?"){
|
||||||
|
await this.performFind();
|
||||||
|
return
|
||||||
|
}
|
||||||
const searchTerm = this.$input.val();
|
const searchTerm = this.$input.val();
|
||||||
if (waitForEnter && this.searchTerm !== searchTerm) {
|
if (waitForEnter && this.searchTerm !== searchTerm) {
|
||||||
await this.performFind();
|
await this.performFind();
|
||||||
@ -272,4 +276,10 @@ export default class FindWidget extends NoteContextAwareWidget {
|
|||||||
isEnabled() {
|
isEnabled() {
|
||||||
return super.isEnabled() && ['text', 'code', 'render'].includes(this.note.type);
|
return super.isEnabled() && ['text', 'code', 'render'].includes(this.note.type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async entitiesReloadedEvent({loadResults}) {
|
||||||
|
if (loadResults.isNoteContentReloaded(this.noteId)) {
|
||||||
|
this.$totalFound.text("?")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user