@loafmarkets/ui 0.1.38 → 0.1.39
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/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9833,7 +9833,7 @@ function OrderPanel({
|
|
|
9833
9833
|
"input",
|
|
9834
9834
|
{
|
|
9835
9835
|
type: "text",
|
|
9836
|
-
inputMode: "
|
|
9836
|
+
inputMode: "decimal",
|
|
9837
9837
|
value: isPayInputFocused ? payInputValue : orderTotal.toLocaleString(),
|
|
9838
9838
|
onFocus: (e) => {
|
|
9839
9839
|
setIsPayInputFocused(true);
|
|
@@ -9841,7 +9841,12 @@ function OrderPanel({
|
|
|
9841
9841
|
e.target.select();
|
|
9842
9842
|
},
|
|
9843
9843
|
onBlur: handlePayBlur,
|
|
9844
|
-
onChange: (e) =>
|
|
9844
|
+
onChange: (e) => {
|
|
9845
|
+
const v = e.target.value;
|
|
9846
|
+
if (v === "" || /^\d*\.?\d{0,2}$/.test(v)) {
|
|
9847
|
+
setPayInputValue(v);
|
|
9848
|
+
}
|
|
9849
|
+
},
|
|
9845
9850
|
onKeyDown: (e) => {
|
|
9846
9851
|
if (e.key === "Enter") {
|
|
9847
9852
|
e.target.blur();
|
|
@@ -9907,7 +9912,12 @@ function OrderPanel({
|
|
|
9907
9912
|
e.target.select();
|
|
9908
9913
|
},
|
|
9909
9914
|
onBlur: handleReceiveBlur,
|
|
9910
|
-
onChange: (e) =>
|
|
9915
|
+
onChange: (e) => {
|
|
9916
|
+
const v = e.target.value;
|
|
9917
|
+
if (v === "" || /^\d+$/.test(v)) {
|
|
9918
|
+
setReceiveInputValue(v);
|
|
9919
|
+
}
|
|
9920
|
+
},
|
|
9911
9921
|
onKeyDown: (e) => {
|
|
9912
9922
|
if (e.key === "Enter") {
|
|
9913
9923
|
e.target.blur();
|