Composer component
Composer component onSend prop does not return form event as callback, only thread id and other thread information
![cord icon logo](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcord-icon.19285d53.png&w=32&q=75)
Can you share a little more about what you expect to get in the callback?
![cord icon logo](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcord-icon.19285d53.png&w=32&q=75)
Hello!
Thanks for the feedback.
Would you expect a submit event?
Could you share a bit more on the use case, what would you do with such event?
Don't worry much about that, I got it sorted. I am working on a collaboration tool like vercel
@Dave @Ludo (cord) The onSend function for thread component doesn't work properly
![cord icon logo](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcord-icon.19285d53.png&w=32&q=75)
Can you explain more how it is not properly working? Is it not being called? Is it not being passed the right information?
It's not called, when i send a message. i send an alert to get displayed, stating my message was sent. But that doesn't happen
A call can fix it ?
![cord icon logo](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcord-icon.19285d53.png&w=32&q=75)
Hi, @Brimble Inc , do you mind sharing more of your code? I was able to put a Thread on a page with an onSend method that just console.logs and it printed out.
<Thread
id={threadID}
onSend={({ _threadId, _messageId, _thread }) => { console.log('i was called'); }}
/>
![cord icon logo](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcord-icon.19285d53.png&w=32&q=75)
When I then send a message in the Thread, onSend is called and I see the print out in the console
I did the same thing
it doesn't work over here
![cord icon logo](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcord-icon.19285d53.png&w=32&q=75)
Hey @Brimble Inc , could you confirm if you use cord as React component or web component (cord-thread) please?
If the later, you would need to threadElement.addEventListener('cord-composer:send', yourCallback)
React component
What is the value of threadElement ?
@Dave the onSend function doesn't work the first a message gets sent from the thread component
![cord icon logo](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcord-icon.19285d53.png&w=32&q=75)
Hi @Brimble Inc , I am seeing that as well. Looks like a bug. We will get that fixed.
Has it been fixed ?
![cord icon logo](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcord-icon.19285d53.png&w=32&q=75)
Hey @Brimble Inc! The fix has landed and will be available from tomorrow -- no action needed on your side. Thank you so much for reporting!
Alright great !
I should be able to filter messages that appear on the side bar or threaded comments, why is that not available ?
![cord icon logo](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcord-icon.19285d53.png&w=32&q=75)
@Brimble Inc, I believe @Albert fixed the issue about not sending onSend on the first message in a thread. This is the first you've mentioned filtering on side bar or threaded comments in this post. Did you raise that in a separate issue? Or if not, can you please?
Alright, i would confirm that, do i have to install the latest version of the package ?
I just raised the issue for filtering messages