mixxorz / slippers

A UI component framework for Django. Built on top of Django Template Language.
https://mitchel.me/slippers/
MIT License
506 stars 37 forks source link

{% attrs %} does not work with attributes containing the dot character `.` . #56

Open elpachongco opened 1 year ago

elpachongco commented 1 year ago

Using slippers 0.6.2 and alpine.js. I'm trying to pass @click.outside="open=true" to the component but it doesn't work. Upon testing, other attributes work e.g. name. I also tried x-on:click.outside (like in the docs) but it doesn't work.

Component nav-bottom-menu: <div {% attrs name x-on:click.outside %}></div>

Using the component: {% nav-bottom-menu name="test" x-on:click.outside="open=true" %}

HTML Output: <div name="test"></div>

Is this a bug or intended behaviour? I'm new to slippers and alpine.js so I'm open to suggestions if there are other ways to achieve what I'm trying to do.

Thanks.

dastanko commented 9 months ago

The same here, slippers not passing x-on:click.outside parameter from alpine. Looks like a bug. Any chance that it will be fixed?