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

textarea does not accept boolean attributes #952

Closed
wezm opened this issue Oct 19, 2019 · 1 comment · Fixed by #955
Closed

textarea does not accept boolean attributes #952

wezm opened this issue Oct 19, 2019 · 1 comment · Fixed by #955
Labels
bug good first issue Good for newcomers

Comments

@wezm
Copy link
Contributor

wezm commented Oct 19, 2019

Lucky Version: 0.18

Unlike input, textarea does not accept boolean attributes.

E.g. this works:

mount Shared::Field.new(f.author), &.text_input(attrs: [:required])

This does not:

mount Shared::Field.new(f.summary), &.textarea(attrs: [:required])

The error is:

web    | In lib/lucky/src/lucky/tags/base_tags.cr:139:14
web    |
web    |  139 | options[key.to_s] = value
web    |               ^
web    | Error: no overload matches 'Hash(String, Lucky::AllowedInTags | String)#[]=' with types String, Array(Symbol)
web    |
web    | Overloads are:
web    |  - Hash(K, V)#[]=(key : K, value : V)
@jwoertink jwoertink added the bug label Oct 20, 2019
@jwoertink
Copy link
Member

Ah good catch. Looks like checkbox is also missing this.

https://github.com/luckyframework/lucky/blob/master/src/lucky/tags/input_helpers.cr#L33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants