@@ -431,6 +431,7 @@ class ReactTextareaAutocomplete extends React.Component {
431431 'closeOnClickOutside' ,
432432 'containerClassName' ,
433433 'containerStyle' ,
434+ 'disableMentions' ,
434435 'dropdownClassName' ,
435436 'dropdownStyle' ,
436437 'grow' ,
@@ -623,6 +624,7 @@ class ReactTextareaAutocomplete extends React.Component {
623624 className,
624625 containerClassName,
625626 containerStyle,
627+ disableMentions,
626628 dropdownClassName,
627629 dropdownStyle,
628630 itemClassName,
@@ -638,17 +640,13 @@ class ReactTextareaAutocomplete extends React.Component {
638640 const suggestionData = this . _getSuggestions ( ) ;
639641 const textToReplace = this . _getTextToReplace ( ) ;
640642
641- let { maxRows } = this . props ;
642- if ( ! this . props . grow ) maxRows = 1 ;
643-
644- return (
645- < div
646- className = { `rta ${ dataLoading === true ? 'rta--loading' : '' } ${
647- containerClassName || ''
648- } `}
649- style = { containerStyle }
650- >
651- { ( dataLoading || suggestionData ) && currentTrigger && (
643+ const SuggestionListDropDown = ( ) => {
644+ if (
645+ ( dataLoading || suggestionData ) &&
646+ currentTrigger &&
647+ ! ( disableMentions && currentTrigger === '@' )
648+ ) {
649+ return (
652650 < div
653651 className = { `rta__autocomplete ${ dropdownClassName || '' } ` }
654652 ref = { ( ref ) => {
@@ -671,7 +669,22 @@ class ReactTextareaAutocomplete extends React.Component {
671669 />
672670 ) }
673671 </ div >
674- ) }
672+ ) ;
673+ }
674+ return null ;
675+ } ;
676+
677+ let { maxRows } = this . props ;
678+ if ( ! this . props . grow ) maxRows = 1 ;
679+
680+ return (
681+ < div
682+ className = { `rta ${ dataLoading === true ? 'rta--loading' : '' } ${
683+ containerClassName || ''
684+ } `}
685+ style = { containerStyle }
686+ >
687+ < SuggestionListDropDown />
675688 < Textarea
676689 { ...this . _cleanUpProps ( ) }
677690 className = { `rta__textarea ${ className || '' } ` }
@@ -700,6 +713,7 @@ ReactTextareaAutocomplete.propTypes = {
700713 closeOnClickOutside : PropTypes . bool ,
701714 containerClassName : PropTypes . string ,
702715 containerStyle : PropTypes . object ,
716+ disableMentions : PropTypes . bool ,
703717 dropdownClassName : PropTypes . string ,
704718 dropdownStyle : PropTypes . object ,
705719 itemClassName : PropTypes . string ,
0 commit comments