@@ -2,7 +2,6 @@ import classNames from 'classnames';
22import toArray from 'rc-util/lib/Children/toArray' ;
33import KeyCode from 'rc-util/lib/KeyCode' ;
44import * as React from 'react' ;
5- import { polyfill } from 'react-lifecycles-compat' ;
65import KeywordTrigger from './KeywordTrigger' ;
76import { MentionsContextProvider } from './MentionsContext' ;
87import Option , { OptionProps } from './Option' ;
@@ -57,6 +56,12 @@ interface MentionsState {
5756class Mentions extends React . Component < MentionsProps , MentionsState > {
5857 public static Option = Option ;
5958
59+ public textarea ?: HTMLTextAreaElement ;
60+
61+ public measure ?: HTMLDivElement ;
62+
63+ public focusId : number | undefined = undefined ;
64+
6065 public static defaultProps = {
6166 prefixCls : 'rc-mentions' ,
6267 prefix : '@' ,
@@ -77,12 +82,6 @@ class Mentions extends React.Component<MentionsProps, MentionsState> {
7782 return newState ;
7883 }
7984
80- public textarea ?: HTMLTextAreaElement ;
81-
82- public measure ?: HTMLDivElement ;
83-
84- public focusId : number | undefined = undefined ;
85-
8685 constructor ( props : MentionsProps ) {
8786 super ( props ) ;
8887 this . state = {
@@ -399,6 +398,4 @@ class Mentions extends React.Component<MentionsProps, MentionsState> {
399398 }
400399}
401400
402- polyfill ( Mentions ) ;
403-
404401export default Mentions ;
0 commit comments