mirror of
				https://github.com/ae-utbm/sith.git
				synced 2025-10-31 00:53:08 +00:00 
			
		
		
		
	Fix inconsistent search behavior on counter click codes
This commit is contained in:
		| @@ -76,7 +76,15 @@ export class CounterProductSelect extends AutoCompleteSelectBase { | ||||
|     return { | ||||
|       ...super.tomSelectSettings(), | ||||
|       openOnFocus: false, | ||||
|       searchField: ["code", "text"], | ||||
|       // We make searching on exact code matching a higher priority | ||||
|       // We need to manually set weights or it results on an inconsistent | ||||
|       // behavior between production and development environment | ||||
|       searchField: [ | ||||
|         // @ts-ignore documentation says it's fine, specified type is wrong | ||||
|         { field: "code", weight: 2 }, | ||||
|         // @ts-ignore documentation says it's fine, specified type is wrong | ||||
|         { field: "text", weight: 0.5 }, | ||||
|       ], | ||||
|     }; | ||||
|   } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user