Skip to content
New issue

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

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

Already on GitHub? # to your account

wrapper_class is not overridden in check_box helper #738

Open
aydinkazim opened this issue Oct 8, 2024 · 0 comments
Open

wrapper_class is not overridden in check_box helper #738

aydinkazim opened this issue Oct 8, 2024 · 0 comments

Comments

@aydinkazim
Copy link
Contributor

Hello,

I'm experiencing an inconsistency with the wrapper_class option when using the check_box helper in the bootstrap_form gem. For most form elements like text_field and file_field, specifying a wrapper_class will override the existing wrapper class with the provided one. However, with check_box, the specified class is appended to the existing wrapper class instead of overriding it.

Here’s an example of the code I’m using:

@f.check_box(:remove_image, wrapper_class: 'yamtar')
Screenshot 2024-10-08 at 14 19 33

In this case, the check_box wrapper class is not overridden by 'yamtar'. Instead, it adds 'yamtar' to the existing wrapper classes. This behavior is inconsistent with other helpers like text_field and file_field, where the wrapper class is fully overridden.

Is this the intended behavior for check_box, or could it be a bug? It would be helpful if the check_box behavior matched that of the other helpers for consistency.

Thank you for your help! ❤️

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

No branches or pull requests

1 participant