Topic: Set the value of an Input component.
Mikołaj Smoleński staff answered 7 years ago
awolfard pro commented 7 years ago
Hi Mikolaj, Thanks for the reply. That you can change the text inside the input only manually is that on purpose and does it also apply to for instance dropdowns? I can imagine scenarios where a value is automatically selected in a dropdown (or even a value is set in a text input) when the value of another dropdown (or other input) changes. Other scenario could be responding to a redux state change where you have to show something else in an input. That the text inside an input can only be changed by hand is not sufficient for me right now. Do you think this can be added in a future release? Regards, Arnoud.Mikołaj Smoleński staff commented 7 years ago
We are constantly developing MDB React and considering all clients tips or suggestions. We'll do our best to allow users manipulating dropdown or input values in the next releases. Regardsawolfard pro commented 7 years ago
Thanksfootnootes commented 6 years ago
has defaultValue been included for MDB input?
Anna Morawska staff answered 6 years ago
Hi there,yes, you can use the valueDefault prop
import React from "react";
import { MDBInput } from "mdbreact";
const InputPage = () => {
return (
<MDBInput label="Material input" valueDefault="some value" />
);
}
export default InputPage;
Please check out MDBInput documentation here, especially API tab.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: No
- Technology: MDB React
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No