Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is possible trigger from multiple chars ? #51

Closed
bayaroch opened this issue Apr 22, 2021 · 2 comments
Closed

is possible trigger from multiple chars ? #51

bayaroch opened this issue Apr 22, 2021 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@bayaroch
Copy link

How can i trigger renderSuggestion from multiple trigger characters like single-byte @ and double byte @

@dabakovich dabakovich added the duplicate This issue or pull request already exists label May 15, 2022
@dabakovich
Copy link
Owner

It will be available in next v3 release.

Duplicates #38, let's continue discussion there.

dabakovich added a commit that referenced this issue May 15, 2022
… pattern

Wrap trigger in regex with {}, so we can now use multiple characters.

Add support for custom trigger pattern.

BREAKING CHANGES
New renames:
`PartType` -> `Config`
`isTriggerPartType` -> `isTriggerConfig`
`getMentionValue` -> `getTriggerValue`
`replaceMentionValues` -> `replaceTriggerValues`

Change default trigger regex and mention value from `@[David Tabaka](123)` to `{@}[David Tabaka](123)`.

Useful for #38, #51, #52, #80.
dabakovich added a commit that referenced this issue May 16, 2022
@dabakovich
Copy link
Owner

I'm glad to say that v3 release is coming with few core improvements. One of the new features is full support of multiple characters trigger and custom regex pattern for mentions.

You can find examples of using new v3 release here: https://github.com/dabakovich/react-native-controlled-mentions/blob/3.0/example/mentions-functional-component.tsx

To test alpha pre-release please, install the library using next command:

yarn add react-native-controlled-mentions@alpha
// or
npm install --save react-native-controlled-mentions@alpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants