@@ -22,23 +22,27 @@ type BaseTextareaAttrs = Omit<
2222 'prefix' | 'onChange' | 'onSelect'
2323> ;
2424
25+ export type Placement = 'top' | 'bottom' ;
26+
2527export interface MentionsProps extends BaseTextareaAttrs {
28+ autoFocus ?: boolean ;
29+ className ?: string ;
2630 defaultValue ?: string ;
31+ notFoundContent ?: React . ReactNode ;
32+ split ?: string ;
33+ style ?: React . CSSProperties ;
34+ transitionName ?: string ;
35+ placement ?: Placement ;
36+ prefix ?: string | string [ ] ;
37+ prefixCls ?: string ;
2738 value ?: string ;
39+ filterOption ?: false | typeof defaultFilterOption ;
40+ validateSearch ?: typeof defaultValidateSearch ;
2841 onChange ?: ( text : string ) => void ;
2942 onSelect ?: ( option : OptionProps , prefix : string ) => void ;
3043 onSearch ?: ( text : string , prefix : string ) => void ;
3144 onFocus ?: React . FocusEventHandler < HTMLTextAreaElement > ;
3245 onBlur ?: React . FocusEventHandler < HTMLTextAreaElement > ;
33- prefixCls ?: string ;
34- prefix ?: string | string [ ] ;
35- className ?: string ;
36- style ?: React . CSSProperties ;
37- autoFocus ?: boolean ;
38- split ?: string ;
39- validateSearch ?: typeof defaultValidateSearch ;
40- filterOption ?: false | typeof defaultFilterOption ;
41- notFoundContent ?: React . ReactNode ;
4246}
4347interface MentionsState {
4448 value : string ;
@@ -206,7 +210,7 @@ class Mentions extends React.Component<MentionsProps, MentionsState> {
206210 } ;
207211
208212 public onInputBlur : React . FocusEventHandler < HTMLTextAreaElement > = event => {
209- this . onBlur ( event ) ;
213+ // this.onBlur(event);
210214 } ;
211215
212216 public onDropdownFocus = ( ) => {
@@ -317,7 +321,16 @@ class Mentions extends React.Component<MentionsProps, MentionsState> {
317321
318322 public render ( ) {
319323 const { value, measureLocation, measurePrefix, measuring, activeIndex } = this . state ;
320- const { prefixCls, className, style, autoFocus, notFoundContent, ...restProps } = this . props ;
324+ const {
325+ prefixCls,
326+ placement,
327+ transitionName,
328+ className,
329+ style,
330+ autoFocus,
331+ notFoundContent,
332+ ...restProps
333+ } = this . props ;
321334
322335 const inputProps = omit (
323336 restProps ,
@@ -359,7 +372,13 @@ class Mentions extends React.Component<MentionsProps, MentionsState> {
359372 onFocus : this . onDropdownFocus ,
360373 } }
361374 >
362- < KeywordTrigger prefixCls = { prefixCls } options = { options } visible = { true } >
375+ < KeywordTrigger
376+ prefixCls = { prefixCls }
377+ transitionName = { transitionName }
378+ placement = { placement }
379+ options = { options }
380+ visible = { true }
381+ >
363382 < span > { measurePrefix } </ span >
364383 </ KeywordTrigger >
365384 </ MentionsContextProvider >
0 commit comments