Closed
Description
Describe the bug
The textfield is rendering undefined as a value.
To Reproduce
import { TextField } from '@tapsioss/react-components/TextField';
const Test = () => {
// the initial value of the state is undefined
const [phoneNumber, setPhoneNumber] = useState<string>();
return (
<div>
<TextField
placeholder="شماره همراه"
type="tel"
maxLength={11}
value={phoneNumber}
onChange={(e) => setPhoneNumber((e.target as HTMLInputElement).value)}
/>
</div>
)
}
Expected behavior
undefined
should be treated as empty string and the placeholder should be rendered instead of the "undefined" string.
Screenshots

Desktop (please complete the following information):
- OS: [e.g. iOS]: MacOS 14
- Browser [e.g. chrome, safari]: Chrome
- Version [e.g. 22]: ^0.17.1
Additional context Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
No labels