React TextBox - Limit the String Length
To limit the string length, assign an integer number to the maxLength property. By default, the string length is unlimited.
Code
- import React from 'react';
- import 'devextreme/dist/css/dx.light.css';
- import { TextBox } from 'devextreme-react/text-box';
- class App extends React.Component {
- render() {
- return (
- <TextBox
- maxLength={10}
- />
- );
- }
- }
- export default App;