Merge pull request #6013 from codingCoffee/gridjs

grid_list: fixed event binding on paging
This commit is contained in:
Ameya Shenoy 2018-08-27 11:11:23 +00:00 committed by GitHub
commit 6cf350bcdc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,7 +49,8 @@ export default function make_datatable(container, doctype) {
tablerow
.css({cursor: 'pointer'})
.click(() => {
.click((e) => {
if ($(e.target).is('[type=checkbox]')) return
window.location.href = window.location.href + '?name=' + data[i].name;
});
for (let fieldname of colnames) {
@ -62,7 +63,7 @@ export default function make_datatable(container, doctype) {
const bind_events = () => {
parent.find('input[type="checkbox"]:not(.select-all)').on('click', (e) => {
parent.on('click', 'input[type="checkbox"]:not(.select-all)', (e) => {
set_actions();
e.stopPropagation();
});