Open MilyMilo opened 3 years ago
I just confirmed the exact same thing happens in the experiments chat demo. Entire messages container gets replaced with the singular edited message, whenever a message is changed.
Huh, this must have been a but that snuck in there in a more recent commit. I'll try and take a look this weekend and get back to you, hopefully with a fix. Thanks for reporting this!
While using streams, the whole loop gets re-rendered in templates which changes the position of the updated instance in the template. I think this needs an urgent fix
Hey guys! First of all thank you for the work you've done on this implementation, it's a great starting point to implementing turbo with django and I think It'll only get better.
I have a question concerning the dom_target that generated in
get_dom_target
inBroadcastableMixin
. I have recreated the simple chat application, this is my model setup:And these are the templates:
The problem I am encountering is, whenever a message changes, there's a signal sent with domtarget pointing at` to avoid re-rendering all the messages (which btw don't render with that setup, all my messages get replaced with just a single one - the updated one).
messages
. I don't think that should be the case, I'd like to target. specific `messageAn example signal that gets sent, as you see dom_target is
messages
notmessage_9
:I think
get_dom_target
should by default returnf"{self._meta.verbose_name.lower()}_{self.pk}"
, I don't really see howmessages
is helpful. Am I missing something or is this some sort of a bug? If you need more I could share my playground repo with you.