Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a post_handler on a Table action creates a button that doesn't do anything when clicked #567

Open
boxed opened this issue Aug 27, 2024 · 0 comments

Comments

@boxed
Copy link
Collaborator

boxed commented Aug 27, 2024

confirm_slots = Table(
        title=gettext('Confirm planning changes'),
        auto__model=Slot,
        actions__confirm=Action.button(
            post_handler=confirm_slots__post_handler,
        ),
    )

The reason nothing happens is because the <button> will end up in the html without a surrounding <form>, which means there is nothing to submit.

I think we should have an error or warning for this. I found it surprising.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant