feat: open room modal with id prefix

dev
gravel 1 year ago
parent bf9f47e7c5
commit e1b086f0b8
Signed by: gravel
GPG Key ID: C0538F3C906B308F

@ -82,7 +82,11 @@ export const dom = {
tbl_communities: () => document.getElementById("tbl_communities"),
tbl_communities_content_rows:
() => Array.from(dom.tbl_communities()?.rows)?.filter(row => !row.querySelector('th')),
community_row: (communityID) => document.querySelector(`.room-row[${ATTRIBUTES.ROW.IDENTIFIER}="${communityID}"]`),
community_row: (communityID, matchIdPrefix=false) => {
const identifier = ATTRIBUTES.ROW.IDENTIFIER;
const matches = matchIdPrefix ? '^=' : '=';
return document.querySelector(`.room-row[${identifier}${matches}"${communityID}"]`);
},
/**
* @param {HTMLTableRowElement} row
*/

Loading…
Cancel
Save