-
Notifications
You must be signed in to change notification settings - Fork 17
IBX-10608: Added method to reset checkbox states after actions in notifications list. #1751
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
base: 4.6
Are you sure you want to change the base?
Conversation
…ter actions in admin notifications list.
src/bundle/Resources/public/js/scripts/admin.notifications.list.js
Outdated
Show resolved
Hide resolved
src/bundle/Resources/public/js/scripts/admin.notifications.list.js
Outdated
Show resolved
Hide resolved
…eckbox state persistence.
src/bundle/Resources/public/js/scripts/admin.notifications.list.js
Outdated
Show resolved
Hide resolved
| .filter((checkbox) => checkbox.checked) | ||
| .map((checkbox) => checkbox.dataset.notificationId); | ||
|
|
||
| if (!selectedNotifications.length) { |
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.
I wonder whether this check is really needed? Because "mark as read" button should be disabled if nothing is selected, so if this condition is false this function should not be called in the first place.
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.
Hmm, you have a point with the disable state of the button that I was not aware of.
In this specific case it might not be neccesarry then as this is just a double-check
| }); | ||
| }; | ||
|
|
||
| const clearCheckboxes = () => { |
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.
Maybe it would be better to place this logic in admin-ui/src/bundle/Resources/public/js/scripts/admin.table.js? And trigger it with an event. In this file there is a logic related to managing these selection checkboxes in all tables.
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.
I see the file now.
I think it would make more sense to have the logic there too
…check-checkboxes` event.
|



Description:
Added
clearCheckboxesmethod to reset checkbox states after actions in admin notifications list.It worked fine in Chrome, but these changes are meant to fix the bug inside Firefox.
For QA:
Documentation: