@@ -32,6 +32,7 @@ export interface MentionsProps {
3232 validateSearch ?: typeof defaultValidateSearch ;
3333 filterOption ?: false | typeof defaultFilterOption ;
3434 notFoundContent ?: React . ReactNode ;
35+ rows ?: number ;
3536}
3637interface MentionsState {
3738 value : string ;
@@ -52,6 +53,7 @@ class Mentions extends React.Component<MentionsProps, MentionsState> {
5253 validateSearch : defaultValidateSearch ,
5354 filterOption : defaultFilterOption ,
5455 notFoundContent : 'Not Found' ,
56+ rows : 1 ,
5557 } ;
5658
5759 public static getDerivedStateFromProps ( props : MentionsProps , prevState : MentionsState ) {
@@ -309,7 +311,7 @@ class Mentions extends React.Component<MentionsProps, MentionsState> {
309311
310312 public render ( ) {
311313 const { value, measureLocation, measurePrefix, measuring, activeIndex } = this . state ;
312- const { prefixCls, className, style, autoFocus, notFoundContent } = this . props ;
314+ const { prefixCls, className, style, autoFocus, notFoundContent, rows } = this . props ;
313315
314316 const options = measuring ? this . getOptions ( ) : [ ] ;
315317
@@ -319,6 +321,7 @@ class Mentions extends React.Component<MentionsProps, MentionsState> {
319321 autoFocus = { autoFocus }
320322 ref = { this . setTextAreaRef }
321323 value = { value }
324+ rows = { rows }
322325 onChange = { this . onChange }
323326 onKeyDown = { this . onKeyDown }
324327 onKeyUp = { this . onKeyUp }
0 commit comments