Skip to content

Commit a3aec91

Browse files
set number input step to 'any' to allow decimal values in plugin parameters like alert thresholds and tube factors
1 parent 4dc9fc2 commit a3aec91

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

data/js/api.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ function renderPluginParams(plugin_params) {
9898
input.name = param.key;
9999
input.value = param.value || param.default || '';
100100
if (param.required) input.required = true;
101+
102+
// Number inputs default to step="1", which rejects decimals such as
103+
// an alert threshold of 0.3 or a tube factor of 123.5.
104+
if (input.type === 'number') input.step = 'any';
101105

102106
group.appendChild(label);
103107
group.appendChild(input);

0 commit comments

Comments
 (0)