mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Spinner fixes (#1371)
* Fix for function node invalid spinner values to close #1370 * better validation of spinners for inject and delay (don’t allow negative numbers) * remove need for declaring local min variable
This commit is contained in:
committed by
Nick O'Leary
parent
e09efba313
commit
a844ca161f
@@ -73,7 +73,13 @@
|
||||
oneditprepare: function() {
|
||||
var that = this;
|
||||
$( "#node-input-outputs" ).spinner({
|
||||
min:1
|
||||
min:1,
|
||||
change: function(event, ui) {
|
||||
var value = this.value;
|
||||
if (!value.match(/^\d+$/)) { value = 1; }
|
||||
else if (value < this.min) { value = this.min; }
|
||||
if (value !== this.value) { $(this).spinner("value", value); }
|
||||
}
|
||||
});
|
||||
|
||||
this.editor = RED.editor.createEditor({
|
||||
|
Reference in New Issue
Block a user