import React, { useEffect, useState } from "react"; import { Input } from "antd"; import FloatLabel from "./FloatLabel/index.jsx"; import "./main.scss"; export const VersionUpdateInputField = ({ fieldState, fieldApi, ...props }) => { const { value } = fieldState; const [inpValue, setInputValue] = useState('') const { field, onChange, isOnChange, onBlur, label, forwardedRef, required, valueData, ...rest } = props; useEffect(() => { if (!valueData) { setInputValue(false) } }, [valueData]) return (
{ setInputValue(e?.target?.value) if (onChange) { onChange(e); } }} onBlur={(e) => { if (onBlur) { onBlur(e); } }} />
); };