PVRT Handling IO-736
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user