Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

draft-js-mention-plugin

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

draft-js-mention-plugin - npm Package Compare versions

Comparing version 2.0.0-rc2 to 2.0.0-rc3

1

CHANGELOG.md

@@ -10,2 +10,3 @@ # Change Log

- Added config option `mentionSuggestionsComponent`. If provided the passed component replaces the default `MentionSuggestions` component. The provided component must implement the same interface like `MentionSuggestions`.
- Added support popoverComponent on the `MentionSuggestions` component. Thanks to @samdroid-apps

@@ -12,0 +13,0 @@ - Introduced a new configuration option `mentionTrigger`. By default it is set to `@`. As before by default typing `@` will trigger the search for mentions. You can provide a custom character or string to change when the search is triggered. [#320](https://github.com/draft-js-plugins/draft-js-plugins/pull/320) Thanks to @yjang1031

17

lib/index.js

@@ -6,4 +6,13 @@ 'use strict';

});
exports.defaultSuggestionsFilter = undefined;
exports.defaultSuggestionsFilter = exports.MentionSuggestions = undefined;
var _MentionSuggestions = require('./MentionSuggestions');
Object.defineProperty(exports, 'MentionSuggestions', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_MentionSuggestions).default;
}
});
var _decorateComponentWithProps = require('decorate-component-with-props');

@@ -19,4 +28,2 @@

var _MentionSuggestions = require('./MentionSuggestions');
var _MentionSuggestions2 = _interopRequireDefault(_MentionSuggestions);

@@ -163,2 +170,4 @@

mentionComponent = config.mentionComponent,
_config$mentionSugges = config.mentionSuggestionsComponent,
mentionSuggestionsComponent = _config$mentionSugges === undefined ? _MentionSuggestions2.default : _config$mentionSugges,
_config$entityMutabil = config.entityMutability,

@@ -182,3 +191,3 @@ entityMutability = _config$entityMutabil === undefined ? 'SEGMENTED' : _config$entityMutabil,

return {
MentionSuggestions: (0, _decorateComponentWithProps2.default)(_MentionSuggestions2.default, mentionSearchProps),
MentionSuggestions: (0, _decorateComponentWithProps2.default)(mentionSuggestionsComponent, mentionSearchProps),
decorators: [{

@@ -185,0 +194,0 @@ strategy: (0, _mentionStrategy2.default)(mentionTrigger),

@@ -249,3 +249,5 @@ 'use strict';

_this.props.ariaProps.ariaActiveDescendantID = descendant;
_this.state.focusedOptionIndex = index;
_this.setState({
focusedOptionIndex: index
});

@@ -252,0 +254,0 @@ // to force a re-render of the outer component to change the aria props

{
"name": "draft-js-mention-plugin",
"version": "2.0.0-rc2",
"version": "2.0.0-rc3",
"description": "Mention Plugin for DraftJS",

@@ -5,0 +5,0 @@ "author": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc