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

Allow hx- action attributes (hx-get, hx-put, etc) without a value #40

Open
egil opened this issue May 8, 2024 · 2 comments
Open

Allow hx- action attributes (hx-get, hx-put, etc) without a value #40

egil opened this issue May 8, 2024 · 2 comments

Comments

@egil
Copy link
Owner

egil commented May 8, 2024

Enabling the hx- action attributes to be used without specifying a value, which implicitly should set the current URL as the address.

@khalidabuhakmeh
Copy link

Arc -2024-05-29 -09-46-03

This might be a quirk of Razor and null values (null values are not rendered on elements). Setting an hx- element to an empty string defaults the behavior the current URL as expected.

JetBrains Rider -2024-05-29 -09-47-32

@egil
Copy link
Owner Author

egil commented May 29, 2024

That may actually be the correct. That is, I think that closes the issue. This way the user has been explicit in that they just want the current url by setting the empty string, where as null is undefined behavior.

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

2 participants