Giter Site home page Giter Site logo

Comments (7)

jukben avatar jukben commented on June 2, 2024 1

@Psyphant Thanks for the reporting! I've just released new version which fixing this behavior. (Let's move hypothetical discussion into #145 )

from react-textarea-autocomplete.

teilzeitgeist avatar teilzeitgeist commented on June 2, 2024 1

@Psyphant Thanks for the reporting! I've just released new version which fixing this behavior. (Let's move hypothetical discussion into #145 )

@jukben I have to thank! That was an incredible fast fix 👍

from react-textarea-autocomplete.

jukben avatar jukben commented on June 2, 2024

Hey! I don't think it's problem in RTA. Could you please provide repro. Easiest would be use this CodePen https://codepen.io/jukben/pen/bYZqvR as start.

What I'm thinking is about is that you return an empty array in [] from the provider, because you are seeking for @}. Could you please check it?

Anyway, thanks for this issues. I'm going to help you as much as possible!

from react-textarea-autocomplete.

coniel avatar coniel commented on June 2, 2024

It is indeed returning []. However, when I write something like in the gif:

\frac{@foo}{@}

it's not seeking @} but it's seeking foo}{@}. Basically, the RegEx is finding the wrong @.

Here's a pen showing basically how I use it: https://codepen.io/anon/pen/LmWbNQ

Thank you so much for the help btw!

from react-textarea-autocomplete.

jukben avatar jukben commented on June 2, 2024

I see. 👍 That's actually another feature. Your use case is very specifics so I'm wondering how to solve it properly. This component is build to follow trigger point to the end of the word but in your case, it might be good to have some "boundaries" set, not sure how, though.

Do you have any idea what would you expect? Reset the trigger when another trigger is typed – @first@second - in current implementation output functor get first@second, with the new one it will get the second. That would make sense, probably. The only disadvantage is that you can't get token with the same char as the actual trigger point.

from react-textarea-autocomplete.

jukben avatar jukben commented on June 2, 2024

I will try to enhance the behavior for your use-case as a part of #61. It's quite huge change, though. But I hope it should be possible to solve it. Stay tuned. 👍

from react-textarea-autocomplete.

teilzeitgeist avatar teilzeitgeist commented on June 2, 2024

I think I have a similar problem:

I wanna use it in a project but there is an requirement named "Group mentions", which means besides the known "@user" autocomplete there is also an "@@group" feature.

So I have two triggers: "@" and "@@".
My problem is that since "@" is triggered, the trigger of "@@" only fires once and than after another char never again.

Here you can finde the example code: https://codesandbox.io/embed/8x9qww899l

from react-textarea-autocomplete.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.