mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 19:17:13 -05:00 
			
		
		
		
	Last time fixing the toggling logic, I hope =/
This commit is contained in:
		
							parent
							
								
									3d8cd0f0d6
								
							
						
					
					
						commit
						7d212f6e80
					
				@ -108,9 +108,9 @@ export class FilterEditorViewService {
 | 
			
		||||
 | 
			
		||||
    if (existingRules && existingItemRule) {
 | 
			
		||||
      filterRules.splice(filterRules.indexOf(existingItemRule), 1) // if exact rule exists just remove
 | 
			
		||||
    } else if (existingItemRule && filterRuleType.multi) { // e.g. tags can have multiple
 | 
			
		||||
    } else if (existingRules.length > 0 && filterRuleType.multi) { // e.g. tags can have multiple
 | 
			
		||||
      filterRules.push({type: filterRuleType, value: item.id})
 | 
			
		||||
    } else if (existingRules.length) { // Correspondents & DocumentTypes only one
 | 
			
		||||
    } else if (existingRules.length > 0) { // Correspondents & DocumentTypes only one
 | 
			
		||||
      filterRules.find(rule => rule.type.id == filterRuleType.id).value = item.id
 | 
			
		||||
    } else {
 | 
			
		||||
      filterRules.push({type: filterRuleType, value: item.id})
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user