wimdeblauwe / htmx-spring-boot

Spring Boot and Thymeleaf helpers for working with htmx
Apache License 2.0
503 stars 48 forks source link

Is hx:on supported? #125

Open jeffreyhwang opened 2 months ago

jeffreyhwang commented 2 months ago

Looking at the https://github.com/wimdeblauwe/htmx-spring-boot/blob/69fb0e1604a4fc97d97681df9a37f69b3054e1c5/htmx-spring-boot-thymeleaf/src/main/java/io/github/wimdeblauwe/htmx/spring/boot/thymeleaf/HtmxDialect.java#L27-55, it doesn't look like hx:on is supported.

When I try to use it in thymeleaf, it looks like hx:on is being rendered as hx:on, not hx-on.

Alternative that works is using th:hx-on::before-request, but I was wondering if there is a way to use hx:on to keep things consistent.

Thank you!