You've already forked joplin
							
							
				mirror of
				https://github.com/laurent22/joplin.git
				synced 2025-10-31 00:07:48 +02:00 
			
		
		
		
	Mobile: Prevent search box from being cleared when updated from somewhere else
This commit is contained in:
		| @@ -73,7 +73,7 @@ class SearchScreenComponent extends BaseScreenComponent { | ||||
|  | ||||
| 	UNSAFE_componentWillReceiveProps(newProps) { | ||||
| 		let newState = {}; | ||||
| 		if ('query' in newProps) newState.query = newProps.query; | ||||
| 		if ('query' in newProps && !this.state.query) newState.query = newProps.query; | ||||
|  | ||||
| 		if (Object.getOwnPropertyNames(newState).length) { | ||||
| 			this.setState(newState); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user