You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if react-beautiful-chat could support message deletion, here below I describe how to implement it (probably not the best way to do it: beware!):
pass a function msg => { /*customCodeForDeletion()*/ } to the onDelete props in the Launcher component
if the props is not null, the message components should support deletion by showing an appropriate UI element with an onClick handle that fires the passed in props passing as a parameter the msg object
By implementing this solution we would leave to the RBC user the freedom to choose whichever ID they wanna use for messages identification: they can choose to set an id property on the message object that will be given back to the onDelete function to use for the api call.
The text was updated successfully, but these errors were encountered:
It would be nice if react-beautiful-chat could support message deletion, here below I describe how to implement it (probably not the best way to do it: beware!):
msg => { /*customCodeForDeletion()*/ }
to theonDelete
props in theLauncher
componentonClick
handle that fires the passed in props passing as a parameter themsg
objectBy implementing this solution we would leave to the RBC user the freedom to choose whichever ID they wanna use for messages identification: they can choose to set an
id
property on themessage
object that will be given back to theonDelete
function to use for the api call.The text was updated successfully, but these errors were encountered: