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

Unable to set null / empty values #4

Closed
croxton opened this issue Oct 25, 2021 · 2 comments
Closed

Unable to set null / empty values #4

croxton opened this issue Oct 25, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@croxton
Copy link

croxton commented Oct 25, 2021

Describe the bug

s-val:myparam="" is converted to s-val:myparam="true"

To reproduce

<button type="reset"  sprig s-trigger="click" s-val:myparam="">
Click me
</button>

Expected behaviour

myparam should not be converted to true and should set the variable to NULL, so that variables can be un-set.
Was working in v1.9

Versions

  • Plugin version: 1.10.4
  • Craft version: 3.7.17.2
@croxton croxton added the bug Something isn't working label Oct 25, 2021
@bencroker
Copy link
Contributor

bencroker commented Oct 25, 2021

Thanks, this has already been addressed in putyourlightson/craft-sprig#178 (comment) and fixed in 23b2292 for the next release.

@bencroker
Copy link
Contributor

Released the fix in Sprig Core 1.1.5 which you can get by running composer update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants