@nebularstreams/libmui 2.5.110 → 2.5.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -197,7 +197,7 @@ const
|
|
|
197
197
|
}
|
|
198
198
|
},
|
|
199
199
|
onbeforeinput: (e) => {
|
|
200
|
-
if (attrs.subtype === "number" && e.data && !/^[0-9
|
|
200
|
+
if (attrs.subtype === "number" && e.data && !/^[0-9.\-]$/.test(e.data)) {
|
|
201
201
|
e.preventDefault(); // nothing but 0-9 or “.” gets through
|
|
202
202
|
}
|
|
203
203
|
},
|
|
@@ -435,7 +435,11 @@ const
|
|
|
435
435
|
m(ButtonNew, {
|
|
436
436
|
...metaDef.addAction,
|
|
437
437
|
onClick: (e) => {
|
|
438
|
-
metaDef.addAction.onClick
|
|
438
|
+
if (metaDef.addAction.onClick) {
|
|
439
|
+
metaDef.addAction.onClick(e, parameters, auxParameters);
|
|
440
|
+
} else if (metaDef.addAction.template) {
|
|
441
|
+
rawValue.push(clone(metaDef.addAction.template));
|
|
442
|
+
}
|
|
439
443
|
m.redraw();
|
|
440
444
|
}
|
|
441
445
|
})
|