Minor random fixes

This commit is contained in:
Patrick Fic
2020-07-23 14:39:45 -07:00
parent 8a4f0dda44
commit acd8984d5b
18 changed files with 389 additions and 353 deletions

View File

@@ -4,6 +4,7 @@ function FormItemCurrency(props, ref) {
return (
<InputNumber
{...props}
ref={ref}
style={{ width: "initial" }}
// formatter={(value) => `$ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ",")}
// parser={(value) => value.replace(/\$\s?|(,*)/g, "")}

View File

@@ -5,6 +5,7 @@ function FormItemEmail(props, ref) {
return (
<Input
{...props}
ref={ref}
addonAfter={
props.defaultValue || props.value ? (
<a href={`mailto:${props.defaultValue || props.value}`}>

View File

@@ -1,14 +1,7 @@
import React, { forwardRef } from "react";
import NumberFormat from "react-number-format";
function FormItemPhone(props, ref) {
return (
<NumberFormat
{...props}
type="tel"
format="###-###-####"
/>
);
return <NumberFormat {...props} ref={ref} type="tel" format="###-###-####" />;
}
export default forwardRef(FormItemPhone);

View File

@@ -1,9 +1,9 @@
import { Button } from "antd";
import React from "react";
import React, { forwardRef } from "react";
import { useTranslation } from "react-i18next";
import AlertComponent from "../alert/alert.component";
export default function ResetForm({ resetFields }) {
function ResetForm({ resetFields }) {
const { t } = useTranslation();
return (
<AlertComponent
@@ -19,3 +19,5 @@ export default function ResetForm({ resetFields }) {
/>
);
}
export default forwardRef(ResetForm);