jonathan-s / django-sockpuppet

Build reactive applications with the django tooling you already know and love.
https://github.com/jonathan-s/django-sockpuppet
MIT License
450 stars 22 forks source link

Fix that javascript not triggering correctly after reflex #12

Closed jonathan-s closed 4 years ago

jonathan-s commented 4 years ago

We were missing to add last when broadcasting to cable ready, an attribute that is needed later in javascript. It also didn't transform the keys entirely correctly to camelCase.

Using the inflector library it'll convert data-controller to dataController something that we are not interested in. So we roll our own.

We also make a recursive call so that an entire list or object gets all their keys transformed correctly.