Releases: dabakovich/react-native-controlled-mentions
Big Update Comming! v3.0.0-alpha.2 Pre-release Notes
About Release
In that release was rethought and re-designed logic for rendering mentions, suggestions and core logic for parsing mention values. In fact, we have no need to render all this stuff in the MentionInput
component. And more – we don't need the MentionInput
component as well. It's enough to provide just a few props directly to the TextInput component.
Now you will be able to use hook for control mention state. The main idea – suggestions rendering now will be fully controlled by user and is extracted from MentionInput
component.
Added
- New
useMentions
hook that allows to render suggestions separately fromTextInput
component (#40, #44, #65, #75) - Ability to provide custom regex pattern (for example,
david:123
. #52, #70, #80) - Ability to use multiple characters triggers (for example
@@
,##
etc. #38, #51) - More examples for different cases (#67)
Fixed
- Some unstable behavior with typed emojis in the
TextInput
(#66)
Breaking Changes
- Change default trigger regex and mention value from
@[David Tabaka](123)
to{@}[David Tabaka](123)
- Now custom regex patterns should have only one regex group
- Removed
containerStyle
prop from theMentionInput
component - Removed
inputRef
prop from theMentionInput
component, use traditionalref
now - Removed
renderSuggestions
andisBottomMentionSuggestionsRender
from thePartType
(newConfig
type) - Some refactored names:
MentionSuggestionsProps -> SuggestionsProvidedProps
onSuggestionPress -> onSelect
PartType -> Config
isTriggerPartType -> isTriggerConfig
getMentionValue -> getTriggerValue
replaceMentionValues -> replaceTriggerValues
How To Play
To play with this alpha
pre-release, please switch to this branch for docs and examples. Also, you can install alpha
version using next commands:
yarn add react-native-controlled-mentions@alpha
// or
npm install --save react-native-controlled-mentions@alpha
v2.2.4
v2.2.0
v2.1.0
v2.0.0
Styling for custom patterns support
ADDED
partTypes
property for defining a list of possible mention or pattern types for parsing (e. g. URLs) (#13)
BREAKING CHANGES
mentionTypes
renamed topartTypes
MentionType
changed toPartType
which can be eitherMentionPartType
orPatternPartType
New types defined in README.md.
v1.0.0
Hashtag support
BREAKING CHANGES
renderSuggestions
,trigger
,isInsertSpaceAfterMention
,mentionTextStyle
is now moved tomentionTypes
property- 'Mentions' component now renamed to 'MentionInput'
mentionRegEx
changed a little big
Please see the example app in /example
folder to get more details.
FIXED
- Wrong editing with keyboard auto-correction (#1)
ADDED
- Support for multiple mention types (#9)
- Jest tests support
v0.1.8
v0.1.7
v0.1.6
v0.1.5
Fixed
- matchall error on old RN versions