@onehat/ui 0.3.160 → 0.3.162

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/ui",
3
- "version": "0.3.160",
3
+ "version": "0.3.162",
4
4
  "description": "Base UI for OneHat apps",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -56,13 +56,11 @@ function NumberElement(props) {
56
56
  }
57
57
  },
58
58
  onChangeText = (value) => {
59
- if (value.match(/\.$/)) { // if value ends with a decimal point
60
- setLocalValue(value);
61
- return;
62
- }
63
59
 
64
60
  if (value === '') {
65
61
  value = null; // empty string makes value null
62
+ } else if (value.match(/\.$/)) { // value ends with a decimal point
63
+ // don't parseFloat, otherwise we'll lose the decimal point
66
64
  } else {
67
65
  value = parseFloat(value, 10);
68
66
  }
@@ -339,7 +339,7 @@ export default function withEditor(WrappedComponent, isTree = false) {
339
339
  await Repository.save();
340
340
  success = true;
341
341
  } catch (e) {
342
- alert(e.context);
342
+ // alert(e.context);
343
343
  success = false;
344
344
  }
345
345
  setIsSaving(false);