Error using AutoScrollPlugin from @twilio-paste/lexical-library #3038
-
I'm trying to use the AutoScrollPlugin component from the @twilio-paste/lexical-library package in my React application, but I'm getting the following error: "Minified Lexical error #8; visit https://lexical.dev/docs/error?code=8 for the full message or use the non-minified dev environment for full errors and additional helpful warnings." I imported the component and added it to my component's render method with a scrollRef prop. I've checked the provided link, but I'm still not sure what's causing the issue. Can someone help me understand what's going wrong and how to fix it? See line no 74 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @noorarman! You're most likely seeing that error because you have the AutoScrollPlugin with the Chat Log rather than the Chat Composer. It's meant to be used only as a child of the Composer, so that the text the user is typing is always visible. In your case, the plugin is looking for the ChatComposer context, but because it lives with the Log instead of the Composer, it can't find that context. Give that a try and let us know how it goes! |
Beta Was this translation helpful? Give feedback.
Hi @noorarman! You're most likely seeing that error because you have the AutoScrollPlugin with the Chat Log rather than the Chat Composer. It's meant to be used only as a child of the Composer, so that the text the user is typing is always visible. In your case, the plugin is looking for the ChatComposer context, but because it lives with the Log instead of the Composer, it can't find that context. Give that a try and let us know how it goes!