table click event controlled for responsive
This commit is contained in:
parent
d1f987c720
commit
5079d52cce
@ -11,6 +11,7 @@ document.querySelectorAll("[data-table-list]").forEach((row) => {
|
||||
|
||||
//redirect edit or show page for table row click
|
||||
document.querySelectorAll("[data-table-body]").forEach((table) => {
|
||||
if (document.body.clientWidth >= 991) {
|
||||
let rows = table.querySelectorAll("tr");
|
||||
|
||||
rows.forEach((row) => {
|
||||
@ -21,7 +22,7 @@ document.querySelectorAll("[data-table-body]").forEach((table) => {
|
||||
}
|
||||
|
||||
let td = row.getElementsByTagName("td");
|
||||
let first_selector = row.querySelector('[data-bulkaction]') && row.querySelector('[data-bulkaction]') !== null ? 1 : 0;
|
||||
let first_selector = row.querySelector("[data-bulkaction]") && row.querySelector("[data-bulkaction]") !== null ? 1 : 0;
|
||||
|
||||
if (row_href) {
|
||||
for (let i = first_selector; i < td.length - 1; i++) {
|
||||
@ -32,6 +33,7 @@ document.querySelectorAll("[data-table-body]").forEach((table) => {
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
//redirect edit or show page for table row click
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user