Closed
Description
Describe the bug
Since the label
and hideLabel
props are optional, this error should be handled automatically.
[TAPSI][text-field]: Expected a valid `label` or `labelledby` attribute, received none. If you want to hide the label, provide both `label` and `hide-label` attributes.
To Reproduce Steps to reproduce the behavior:
<TextField
placeholder="شماره همراه"
type="tel"
value={phoneNumber}
onChange={(e) => setPhoneNumber((e.target as HTMLInputElement).value)}
hideLabel
label=""
/>
or
<TextField
placeholder="شماره همراه"
type="tel"
value={phoneNumber}
onChange={(e) => setPhoneNumber((e.target as HTMLInputElement).value)}
/>
Expected behavior
This error should not be logged to the console.
Screenshots
Screen.Recording.2025-05-31.at.7.12.13.PM.mov
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
Metadata
Metadata
Assignees
Labels
No labels