Open OmkarArora opened 2 years ago
I'm getting the same issue
I'm experiencing similar behavior with parseValue
Same here. Any updates on this issue? @dabakovich
After a bit of investigation it seems the root issue is from the parseValue
function specifically the part where we call const dividedValueByRegex = value.split(regex);
Previously my regex would get split in a way that doesn't really conform to how the library expects. For example https://google.com might result in dividedValueByRegex
being ["google.com"]
where as the expected value should be [" ", "https://google.com", " "]
. For now I have adjusted my regex to ensure that when being called with .split(regex)
the format results in the later.
After a bit of investigation it seems the root issue is from the
parseValue
function specifically the part where we callconst dividedValueByRegex = value.split(regex);
Previously my regex would get split in a way that doesn't really conform to how the library expects. For example https://google.com might result in
dividedValueByRegex
being["google.com"]
where as the expected value should be[" ", "https://google.com", " "]
. For now I have adjusted my regex to ensure that when being called with.split(regex)
the format results in the later.
could you share your regex?
On a successful match from patternsConfig, the text gets deleted rather than getting the desired highlighting
i have referred the example from here - https://github.com/dabakovich/react-native-controlled-mentions/blob/3.0.0-feat-use-mentions/example/mentions-app.tsx#L90
Whenever I write the letter "a" as given in patternsConfig, it gets deleted.
Here is a Snack of my code - https://snack.expo.dev/@halfcold/react-native-controlled-mentions-v3-alpha-testing