add null value detection when enabling
This commit is contained in:
		
							parent
							
								
									c4e4f5a29b
								
							
						
					
					
						commit
						314bc40fae
					
				
					 1 changed files with 11 additions and 6 deletions
				
			
		|  | @ -324,12 +324,17 @@ class windowman { | |||
| 
 | ||||
|         if (input_elements) { | ||||
|           input_elements.forEach((input_element) => { | ||||
|             (async () => { | ||||
|               input_element.disabled = | ||||
|                 (await secretariat.read( | ||||
|                   input_element.getAttribute("data-enable"), | ||||
|                 )) == null; | ||||
|             })(); | ||||
|             if (input_element.getAttribute("data-enable")) { | ||||
|               (async () => { | ||||
|                 input_element.disabled = | ||||
|                   (await secretariat.read( | ||||
|                     input_element.getAttribute("data-enable"), | ||||
|                   )) == null || | ||||
|                   (await secretariat.read( | ||||
|                     input_element.getAttribute("data-enable"), | ||||
|                   )); | ||||
|               })(); | ||||
|             } | ||||
|           }); | ||||
|         } | ||||
|       } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue