Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!

hberndt free asked 5 years ago


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 answered 5 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:

It looks like this



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.8.4
  • Device: Notebook
  • Browser: Chrome
  • OS: MacOS
  • Provided sample code: Yes
  • Provided link: No
Tags