htmx icon indicating copy to clipboard operation
htmx copied to clipboard

Custom event filter not working, SyntaxError: missing ) in parenthetical

Open Guilouf opened this issue 3 years ago • 0 comments

I have a list of item in a container, which has a trigger to be refreshed every 2 seconds. But, when a boostrap5 modal is opened from one the fetched item, i want to interrupt the polling.

<div
          hx-get="/item-list"
          hx-trigger="load, every 2s [show.bs.modal from:body]">
</div>

The event show.bs.modal from:body is working sandalone, but i can't get it to work as a conditional for the polling event, as it raises a syntax error:

SyntaxError: missing ) in parenthetical
    s https://unpkg.com/[email protected]:1
    Zt https://unpkg.com/[email protected]:1
    Ie https://unpkg.com/[email protected]:1
    Me https://unpkg.com/[email protected]:1
    dt https://unpkg.com/[email protected]:1
    vt https://unpkg.com/[email protected]:1
    G https://unpkg.com/[email protected]:1
    vt https://unpkg.com/[email protected]:1
    <anonymous> https://unpkg.com/[email protected]:1
    dr https://unpkg.com/[email protected]:1
    <anonymous> https://unpkg.com/[email protected]:1
    <anonymous> https://unpkg.com/[email protected]:1
    <anonymous> https://unpkg.com/[email protected]:1
    <anonymous> https://unpkg.com/[email protected]:1

I'm not sure if it's a bug or some misunderstanding from myself.

Guilouf avatar Jul 27 '22 09:07 Guilouf