How to use the draft-js-mention-plugin.defaultSuggestionsFilter function in draft-js-mention-plugin

To help you get started, we’ve selected a few draft-js-mention-plugin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ld-x / last-draft / src / components / Editor.js View on Github external
onSearchChange = ({ value }) => {
    if (this.props.mentionSearchAsync !== undefined) {
      /* async */
      this.props.mentionSearchAsync(value)
      .then((data) => { this.setState({suggestions: fromJS(data.suggestions)}) })
    } else {
      /* static list of users */
      this.setState({
        suggestions: defaultSuggestionsFilter(value, this.props.mentions),
      })
    }
  }
github Datawheel / canon / packages / cms / src / components / editors / DraftWrapper.jsx View on Github external
this.onSearchChange = ({value}) => {
      this.setState({
        suggestions: defaultSuggestionsFilter(value, suggestions)
      });
    };
    // formatters
github Datawheel / canon / packages / cms / src / components / editors / DraftWrapper.jsx View on Github external
this.onSearchChangeFormatter = ({value}) => {
      this.setState({
        suggestionsFormatter: defaultSuggestionsFilter(value, suggestionsFormatter)
      });
    };
    // selectors
github draft-js-plugins / draft-js-plugins / docs / client / components / pages / Home / UnicornEditor / index.js View on Github external
onMentionSearchChange = ({ value }) => {
    this.setState({
      suggestions: defaultSuggestionsFilter(value, mentions),
    });
  };
github mimecuvalo / helloworld / packages / hello-world-editor / ui / autocomplete / Mentions.js View on Github external
const onSearchChange = ({ value }) => {
    setSuggestions(defaultSuggestionsFilter(value, normalizedData() || []));
  };
github draft-js-plugins / draft-js-plugins / stories / mentions / src / App.js View on Github external
render() {
    return (
      <div>
         {
            this.editor = element;
          }}
        /&gt;
        
      </div>
    );
  }
}
github Datawheel / canon / packages / cms / src / components / editors / DraftWrapper.jsx View on Github external
this.onSearchChangeSelector = ({value}) => {
      this.setState({
        suggestionsSelector: defaultSuggestionsFilter(value, suggestionsSelector)
      });
    };
github draft-js-plugins / draft-js-plugins / stories / mentions-custom-trigger / src / App.js View on Github external
onSearchChange = ({ value }) => {
    this.setState({
      suggestions: defaultSuggestionsFilter(value, mentions),
    });
  };
github draft-js-plugins / draft-js-plugins / stories / mentions-custom-styled / src / App.js View on Github external
onSearchChange = ({ value }) => {
    this.setState({
      suggestions: defaultSuggestionsFilter(value, mentions),
    });
  };
github draft-js-plugins / draft-js-plugins / docs / client / components / pages / Home / UnicornEditor / index.js View on Github external
onMentionSearchChange = ({ value }) => {
    this.setState({
      suggestions: defaultSuggestionsFilter(value, mentions),
    });
  };

draft-js-mention-plugin

Mention Plugin for DraftJS

MIT
Latest version published 5 years ago

Package Health Score

67 / 100
Full package analysis