[FEATURE] Toast shown when HTMX request
I am developing an app in which I use a main page that has a div with id="main-content". The links in the navigation bar, use hx_get with hx_target="#main-content", to load the returned html code in that div, so the whole page is not reloaded, only the #main-content div.
A('Services', href='/services', cls='nav-link text-primary', hx_get='/services', hx_target='#main-content'),
@rt("/services") def get(session, request): c = Div(H1("This is my services page"))
add_toast(sess=session, message="Example showing a toast")
return c
I think this is the problem why the toast is not displayed, since the whole page is not reloaded, only a fragment of it.
Do you propose a solution ?
My toasts also stopped working after upgrade to 0.12.14
Fixed see: https://github.com/AnswerDotAI/fasthtml/issues/709#issuecomment-2923053770