PVRT Handling IO-736

This commit is contained in:
Patrick Fic
2021-03-03 15:41:54 -08:00
parent 57f6eec9e4
commit 574f8bab89
21 changed files with 1796 additions and 20 deletions

View File

@@ -1,5 +1,5 @@
import { InputNumber } from "antd";
import React from "react";
import React, { forwardRef } from "react";
// const locale = "en-us";
// const currencyFormatter = (value) => {
@@ -41,22 +41,17 @@ import React from "react";
// }
// };
export default function FormItemCurrency(props) {
function FormItemCurrency(props, ref) {
return (
<InputNumber
{...props}
precision={2}
// formatter={currencyFormatter}
// parser={currencyParser}
// formatter={(value) =>
// "$" +
// parseFloat(value)
// .toFixed(2)
// .replace(/(\d)(?=(\d{3})+\.)/g, "$1,")
// }
// parser={(value) => value.replace(/\$\s?|(,*)/g, "")}
ref={ref}
style={{ width: "initial" }}
// formatter={(value) => `$ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ",")}
// parser={(value) => value.replace(/\$\s?|(,*)/g, "")}
precision={2}
/>
);
}
export default forwardRef(FormItemCurrency);