Comments (7)
@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.
@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.
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.
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.
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.
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.
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)
- Update react version
- Undo/Ctrl-Z function is not working as expected
- Some triggers wipe entire text HOT 2
- onScroll handler for underlying textarea does not get propagated correctly HOT 1
- Clicking on second suggestion replaces whole text HOT 6
- 👋 Beware – not actively maintained. Looking for maintainer and leader of complete rewrite. HOT 1
- TypeError: Illegal invocation HOT 1
- Update React Version HOT 2
- Does trigger support search from an array or api response? HOT 2
- TypeScript Example? HOT 1
- Suggestion-list position HOT 1
- Add support for React 18 HOT 2
- defaultValue not supported
- Remove Space After the AutoCompleted Text
- When using Key Up / Down, it doesn't show what item is selected.
- The suggestion popup is not using updated state HOT 1
- Clear Value after using onItemSelected HOT 3
- Disable autocomplete on 'enter' or 'tab'
- Is there any way to keep dropdown list not disappear when selecting an item, because I want to be able to multiple select HOT 1
- Is any way to use the regex patten to trigger
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-textarea-autocomplete.