forked from MapComplete/MapComplete
Add fakedom to test UI code, replace all 'innerText' with 'textContent' as it is not compatible with fakedom
This commit is contained in:
parent
b0b674b2fb
commit
0f66d7f8cc
17 changed files with 281 additions and 20 deletions
|
@ -107,8 +107,8 @@ export default class Table extends BaseUIElement {
|
|||
let rows: HTMLTableRowElement[] = Array.from(table.rows)
|
||||
rows.splice(0,1) // remove header row
|
||||
rows = rows.sort((a, b) => {
|
||||
const ac = a.cells[col]?.innerText?.toLowerCase()
|
||||
const bc = b.cells[col]?.innerText?.toLowerCase()
|
||||
const ac = a.cells[col]?.textContent?.toLowerCase()
|
||||
const bc = b.cells[col]?.textContent?.toLowerCase()
|
||||
if(ac === bc){
|
||||
return 0
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue