-
-
Notifications
You must be signed in to change notification settings - Fork 232
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
Fix toggle without search query #863
Fix toggle without search query #863
Conversation
Remove the conditional for `data-selected-resources` element to render always, and set a `hidden` css class if there are: * no search params defined in the resource AND * no filters present AND * 1 or none available_view_types Also added the `authenticity_token` to the permitted params as it was consistently showing up in the logs. ``` Unpermitted parameter: :authenticity_token ```
Code Climate has analyzed commit 32cf0e2 and detected 0 issues on this pull request. View more on Code Climate. |
Codecov Report
@@ Coverage Diff @@
## main #863 +/- ##
=======================================
Coverage 93.86% 93.86%
=======================================
Files 457 457
Lines 8325 8325
=======================================
Hits 7814 7814
Misses 511 511
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this contribution!
@@ -32,7 +32,7 @@ From the root directory you can run `bin/dev` and that will start a foreman proc | |||
|
|||
## Seeding the database for local development | |||
|
|||
Run `AVO_ADMIN_PASSWORD=secret bin/rails db:seed` to seed the database with dummy data and create a user for yourself with the email `admin@avohq.io` and password `secret`. | |||
Run `AVO_ADMIN_PASSWORD=secret bin/rails db:seed` to seed the database with dummy data and create a user for yourself with the email `avo@avohq.io` and password `secret`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
<% end %> | ||
</div> | ||
<% end %> | ||
<div class="flex flex-col xs:flex-row xs:justify-between space-y-2 xs:space-y-0 py-4 <%= 'hidden' if @resource.search_query.nil? && @filters.empty? && available_view_types.count <= 1 %>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a remnant from where we had more than two divs in the panel body and we had a space-y-SOMETHING
as a parent. So I went and not render this div at all in those scenarios. It's not the case anymore and we can use hidden
.
Description
Fix the JS error when selecting a checkbox on an Index page that has no search query defined in the resource.
Fixes # (861)
Manual review steps
data-selected-resources
element is populated with IDs that were selected.