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

Unable to set class attribute for select filter #319

Closed
jkaufman opened this issue Jan 4, 2024 · 2 comments
Closed

Unable to set class attribute for select filter #319

jkaufman opened this issue Jan 4, 2024 · 2 comments

Comments

@jkaufman
Copy link

jkaufman commented Jan 4, 2024

I am attempting to style the select filter using input_options. However, passing a value for class has no effect.


Declare a filter with input options specifying the class attribute:

filter(:name, :enum, input_options: {class: 'border-gray-300'}, select: proc { … })

Expected

The provided value for class either combines with or clobbers the default value:

<select class="border-gray-300" name="q[name]" id="q_name">

Actual

The generated HTML retains the default value for class:
<select class="name enum_filter" name="q[name]" id="q_name">

@bogdan
Copy link
Owner

bogdan commented Jan 5, 2024

Fixed in 1.8.1. Please check.

@jkaufman
Copy link
Author

jkaufman commented Jan 5, 2024

Fix confirmed. The values are merged. Thank you!

@bogdan bogdan closed this as completed Jan 5, 2024
# 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

2 participants