draft-js-mention-plugin
Advanced tools
Comparing version 2.0.0-rc2 to 2.0.0-rc3
@@ -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 |
@@ -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": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
61143
1047