Set the disabled state in React TextBox component

21 Oct 20241 minute to read

Disable the TextBox by set enabled property as false to the TextBoxComponent.

import * as React from "react";
import * as ReactDOM from "react-dom";
import { TextBoxComponent } from "@syncfusion/ej2-react-inputs";
export default class App extends React.Component {
    render() {
        return (<div>
                <TextBoxComponent placeholder="Enter Name" enabled={false}/>
            </div>);
    }
}
;
ReactDOM.render(<App />, document.getElementById('input-container'));
import { TextBoxComponent } from "@syncfusion/ej2-react-inputs";
import * as React from "react";
import * as ReactDOM from "react-dom";
export default class App extends React.Component<{}, {}> {
    public render() {
        return (
            <div>
                <TextBoxComponent placeholder="Enter Name" enabled={false}/>
            </div>
        )
    }
};
ReactDOM.render(<App />, document.getElementById('input-container'));