mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Merge pull request #2752 from bartbutenaers/readonly-typedinput
Allow TypedInput to be disabled
This commit is contained in:
		| @@ -965,6 +965,18 @@ | ||||
|         }, | ||||
|         hide: function() { | ||||
|             this.uiSelect.hide(); | ||||
|         }, | ||||
|         disable: function(val) { | ||||
|             if(val === true) { | ||||
|                 this.uiSelect.attr("disabled", "disabled"); | ||||
|             } else if (val === false) { | ||||
|                 this.uiSelect.attr("disabled", null); //remove attr | ||||
|             } else { | ||||
|                 this.uiSelect.attr("disabled", val); //user value | ||||
|             } | ||||
|         }, | ||||
|         disabled: function() { | ||||
|             return this.uiSelect.attr("disabled"); | ||||
|         } | ||||
|     }); | ||||
| })(jQuery); | ||||
|   | ||||
| @@ -26,6 +26,14 @@ | ||||
|     box-sizing: border-box; | ||||
|     overflow:visible; | ||||
|     position: relative; | ||||
|     &[disabled] { | ||||
|         input, button { | ||||
|             background: $secondary-background-inactive; | ||||
|             pointer-events: none; | ||||
|             cursor: not-allowed; | ||||
|         } | ||||
|     } | ||||
|      | ||||
|     .red-ui-typedInput-input-wrap { | ||||
|         flex-grow: 1; | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user