question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Entry and positionSuggestions components should be in the Mention Plugin

See original GitHub issue

For the mentions-plugin I don’t understand why Entry and positionSuggestions components are not included in the plugin. Then we could simply import Entry to use and positionSuggestions would just be internal.

import { Entry, positionSuggestions} from './components/Mention/mentions'
const mentionPlugin = createMentionPlugin({
  mentions,
  positionSuggestions,
  theme: mentionsStyles
})

Would become:

const mentionPlugin = createMentionPlugin({
  mentions,
  theme: mentionsStyles
})
const { Entry } = mentionPlugin

I could probably setup a PR for this if it sounds good.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
juliankrispelcommented, Apr 24, 2018

I’ll reopen this because I think it should go into the mentions plugin

0reactions
svnmcommented, Sep 17, 2020

I just thought this was a more consistent way of doing it. Not a big deal, so happy for the issue to be closed as I don’t think anyone minds the current approach of using the positionSuggestions function. Also the API has changed a little in the current version so looks like this is not as relevant.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mention - DraftJS Plugins - High quality plugins with great UX
This plugin allows the user to choose an entry from a list. ... The MentionSuggestions component is part of the plugin and should...
Read more >
How to use the draft-js-mention-plugin function in draft ... - Snyk
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.
Read more >
z4o4z/draft-js-mention-plugin/CHANGELOG.md - UNPKG
17, - Remove prevState and state from positionSuggestions ... If provided the passed component is used to render a Mention.
Read more >
Mention list and emoji top position (Draft.js) - Stack Overflow
You can achieve it with positionSuggestions configuration option. This option available for both mention and emoji plugins.
Read more >
Draft-js Mention Docs - CodeSandbox
mentionSuggestionsEntryAvatar :CSS class for an entry's avatar image in the suggestions component. positionSuggestionsThe function can be used to manipulate ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found