rc-mentions

  • Version 1.6.1
  • Published
  • 70.1 kB
  • 6 dependencies
  • MIT license

Install

npm i rc-mentions
yarn add rc-mentions
pnpm add rc-mentions

Overview

React Mentions

Index

Classes

class Mentions

class Mentions extends React.Component<MentionsProps, MentionsState> {}

    constructor

    constructor(props: MentionsProps);

      property defaultProps

      static defaultProps: {
      prefixCls: string;
      prefix: string;
      split: string;
      validateSearch: typeof defaultValidateSearch;
      filterOption: typeof defaultFilterOption;
      notFoundContent: string;
      rows: number;
      };

        property focusId

        focusId: number;

          property getOptions

          getOptions: (measureText?: string) => OptionProps[];

            property measure

            measure?: HTMLDivElement;

              property onBlur

              onBlur: (event?: any) => void;

                property onChange

                onChange: any;

                  property onDropdownBlur

                  onDropdownBlur: () => void;

                    property onDropdownFocus

                    onDropdownFocus: () => void;

                      property onFocus

                      onFocus: (event?: any) => void;

                        property onInputBlur

                        onInputBlur: any;

                          property onInputFocus

                          onInputFocus: any;

                            property onKeyDown

                            onKeyDown: any;

                              property onKeyUp

                              onKeyUp: any;
                              • When to start measure: 1. When user press prefix 2. When measureText !== prevMeasureText - If measure hit - If measuring

                                When to stop measure: 1. Selection is out of range 2. Contains space 3. ESC or select one

                              property onPressEnter

                              onPressEnter: any;

                                property Option

                                static Option: any;

                                  property selectOption

                                  selectOption: (option: OptionProps) => void;

                                    property setActiveIndex

                                    setActiveIndex: (activeIndex: number) => void;

                                      property setMeasureRef

                                      setMeasureRef: (element: HTMLDivElement) => void;

                                        property setTextAreaRef

                                        setTextAreaRef: (element: any) => void;

                                          property textarea

                                          textarea?: HTMLTextAreaElement;

                                            property triggerChange

                                            triggerChange: (value: string) => void;

                                              method blur

                                              blur: () => void;

                                                method componentDidUpdate

                                                componentDidUpdate: () => void;

                                                  method focus

                                                  focus: () => void;

                                                    method getDerivedStateFromProps

                                                    static getDerivedStateFromProps: (
                                                    props: MentionsProps,
                                                    prevState: MentionsState
                                                    ) => Partial<MentionsState>;

                                                      method render

                                                      render: () => any;

                                                        method startMeasure

                                                        startMeasure: (
                                                        measureText: string,
                                                        measurePrefix: string,
                                                        measureLocation: number
                                                        ) => void;

                                                          method stopMeasure

                                                          stopMeasure: (callback?: () => void) => void;

                                                            Package Files (2)

                                                            Dependencies (6)

                                                            Dev Dependencies (15)

                                                            Peer Dependencies (2)

                                                            Badge

                                                            To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                            You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/rc-mentions.

                                                            • Markdown
                                                              [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/rc-mentions)
                                                            • HTML
                                                              <a href="https://www.jsdocs.io/package/rc-mentions"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>