mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 04:51:31 +08: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>} | ||||
|      */ | ||||
|     async findNext(direction) { | ||||
|         if (this.$totalFound.text()=="?"){ | ||||
|             await this.performFind(); | ||||
|             return | ||||
|         } | ||||
|         const searchTerm = this.$input.val(); | ||||
|         if (waitForEnter && this.searchTerm !== searchTerm) { | ||||
|             await this.performFind(); | ||||
| @ -272,4 +276,10 @@ export default class FindWidget extends NoteContextAwareWidget { | ||||
|     isEnabled() { | ||||
|         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
	 Elian Doran
						Elian Doran