mixxorz / slippers

A UI component framework for Django. Built on top of Django Template Language.

Home Page:https://mitchel.me/slippers/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

elpachongco opened this issue · comments

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.

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