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 there a way to render the view outside of the TextInput? I need to show this in my own view outside the textInput #69

Closed
shaheer2020 opened this issue Aug 26, 2021 · 4 comments
Labels
duplicate This issue or pull request already exists enhancement New feature or request v3 Feature and fixes for the major v3 release
Projects

Comments

@shaheer2020
Copy link

No description provided.

@Martirosyan21
Copy link

use RootSiblingPortal

@swushi
Copy link

swushi commented Dec 6, 2021

#75

dabakovich added a commit that referenced this issue Apr 26, 2022
Add `onMentionsChange` property to the `MentionInput` component. It allows to render suggestions outside `MentionInput` component — #65, #69, #75.

Fix double trigger of suggestions render. Now we are trigger this only after selection change — #55.

Format `utils.ts` using prettier.

BREAKING CHANGES

Remove `containerStyle` prop from the `MentionInput` component.

Remove `inputRef` prop from the `MentionInput` component. Use traditional `ref` now.

Remove `renderSuggestions` and `isBottomMentionSuggestionsRender` from the Part type.

Rename `MentionSuggestionsProps` type to `SuggestionsProvidedProps`. Rename `onSuggestionPress` to `onSelect` in the type.
@dabakovich
Copy link
Owner

Hi @shaheer2020! Thanks for your feedback.

A new major v3 release is coming, and this issue is one of the main updates.

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.

You can find an example of this here: https://github.com/dabakovich/react-native-controlled-mentions/blob/3.0.0-feat-use-mentions/example/mentions-app.tsx#L90

To install this and play by yourself, please use next commands:

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

I'll be happy to get some feedback from you before the major update will be released.

@dabakovich dabakovich added enhancement New feature or request v3 Feature and fixes for the major v3 release labels May 1, 2022
@dabakovich dabakovich added this to In progress in V3 May 14, 2022
@dabakovich dabakovich moved this from In progress to Ready In Alpha in V3 May 14, 2022
@dabakovich
Copy link
Owner

Let's continue the discussion in the duplicating #65.

@dabakovich dabakovich added the duplicate This issue or pull request already exists label May 14, 2022
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 enhancement New feature or request v3 Feature and fixes for the major v3 release
Projects
V3
Ready In Alpha
Development

No branches or pull requests

4 participants