1 | import React, { Component, CSSProperties, FocusEventHandler } from 'react';
|
2 | export declare type MentionPlacement = 'top' | 'bottom';
|
3 | export interface MentionProps {
|
4 | prefixCls?: string;
|
5 | suggestionStyle?: CSSProperties;
|
6 | suggestions?: Array<any>;
|
7 | onSearchChange?: Function;
|
8 | onChange?: Function;
|
9 | notFoundContent?: any;
|
10 | loading?: Boolean;
|
11 | style?: CSSProperties;
|
12 | defaultValue?: any;
|
13 | value?: any;
|
14 | className?: string;
|
15 | multiLines?: Boolean;
|
16 | prefix?: string;
|
17 | placeholder?: string;
|
18 | getSuggestionContainer?: (triggerNode: Element) => HTMLElement;
|
19 | onFocus?: FocusEventHandler<HTMLElement>;
|
20 | onBlur?: FocusEventHandler<HTMLElement>;
|
21 | readOnly?: boolean;
|
22 | disabled?: boolean;
|
23 | placement?: MentionPlacement;
|
24 | }
|
25 | export interface MentionState {
|
26 | suggestions?: Array<any>;
|
27 | focus?: Boolean;
|
28 | }
|
29 | export default class Mention extends Component<MentionProps, MentionState> {
|
30 | static displayName: string;
|
31 | static getMentions: any;
|
32 | static defaultProps: {
|
33 | notFoundContent: string;
|
34 | loading: boolean;
|
35 | multiLines: boolean;
|
36 | placement: string;
|
37 | };
|
38 | static Nav: any;
|
39 | static toString: any;
|
40 | static toContentState: any;
|
41 | private mentionEle;
|
42 | constructor(props: MentionProps);
|
43 | componentWillReceiveProps(nextProps: MentionProps): void;
|
44 | onSearchChange: (value: string, prefix: string) => any;
|
45 | defaultSearchChange(value: String): void;
|
46 | onFocus: (ev: React.FocusEvent<HTMLElement>) => void;
|
47 | onBlur: (ev: React.FocusEvent<HTMLElement>) => void;
|
48 | focus: () => void;
|
49 | mentionRef: (ele: any) => void;
|
50 | render(): JSX.Element;
|
51 | }
|