DevExtreme React - Limit the String Length

To limit the string length, assign an integer number to the maxLength option. By default, the string length is unlimited.

  • import React from 'react';
  • import { TextBox } from 'devextreme-react/text-box';
  •  
  • class App extends React.Component {
  • render() {
  • return (
  • <TextBox
  • maxLength={10}
  • />
  • );
  • }
  • }
  •  
  • export default App;
See Also