Topic: Numeric fields
Once again a newbie question.
I created a form with MDBInput fields. All numeric fields raise a warning Failed prop type: Invalid prop value
of type number
supplied to t
, expected string
. I switched the type from text to number without success. The field looks like an empty field (value and label are on the same position). Is there no support for numeric values?
<MDBInput
type="number"
label={translate('userManagement.failedAttempts')}
className="form-control"
size="sm"
name="failedAttempts"
id="failedAttempts"
value={current.failedAttempts}
onChange={this.changeHandler}
/>
Jakub Mandra staff premium answered 6 years ago
Hi,
Actually, our inputs do not support type="number" yet. We have a proposal input, named MDBInputSelect
, still in staging, but you can use it.
<div className="md-form">
<MDBInputSelect
getValue={this.getValue}
min={5}
max={15}
value={10}
/>
</div>
It loks like this:
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Free
- Premium support: No
- Technology: MDB React
- MDB Version: 4.8.4
- Device: Notebook
- Browser: Chrome
- OS: MacOS
- Provided sample code: No
- Provided link: No