Skip to content

Releases: dabakovich/react-native-controlled-mentions

Big Update Comming! v3.0.0-alpha.2 Pre-release Notes

16 May 15:31
Compare
Choose a tag to compare

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 from TextInput 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 the MentionInput component
  • Removed inputRef prop from the MentionInput component, use traditional ref now
  • Removed renderSuggestions and isBottomMentionSuggestionsRender from the PartType (new Config 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

10 Mar 21:35
Compare
Choose a tag to compare

FIXED

  • Error when value is null (#36)
  • Errors with regex named capture groups on iOS < 12 (#23) and Hermes (#37)
  • Wrong behavior on adding ) after mention part (#24)
  • Wrong behavior on adding emails (#41)

v2.2.0

22 Feb 13:58
Compare
Choose a tag to compare

ADDED

  • Ability to show mention suggestions for keywords with spaces (#25)

v2.1.0

15 Feb 10:19
Compare
Choose a tag to compare

ADDED

  • Ability to render mention suggestions at the bottom of text input (#27)

v2.0.0

11 Jan 10:24
Compare
Choose a tag to compare

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 to partTypes
  • MentionType changed to PartType which can be either MentionPartType or PatternPartType

New types defined in README.md.

v1.0.0

29 Dec 13:19
Compare
Choose a tag to compare

Hashtag support

BREAKING CHANGES

  • renderSuggestions, trigger, isInsertSpaceAfterMention, mentionTextStyle is now moved to mentionTypes 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

22 Dec 19:19
Compare
Choose a tag to compare

Fixed bugs:

  • inputRef undefined for Mentions #11

v0.1.7

20 Dec 15:09
Compare
Choose a tag to compare

New

  • add mentionTextStyle property (#9)
  • enchanted mention regex to accept word characters and "-" (#9)

Fixed

  • bug with adding mention on new line (#10)

v0.1.6

18 Dec 12:40
Compare
Choose a tag to compare

Fixed

  • add onSelectionChange forwarding (#8)

v0.1.5

17 Dec 19:37
Compare
Choose a tag to compare

Fixed

  • matchall error on old RN versions