chore(js): patch dsfr/table to use data attr instead of name on checkbox

This commit is contained in:
Colin Darie 2024-11-12 14:57:09 +01:00
parent af6dd67cef
commit 753c602802
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
3 changed files with 19 additions and 0 deletions

BIN
bun.lockb

Binary file not shown.

View file

@ -195,5 +195,8 @@
} }
} }
] ]
},
"patchedDependencies": {
"@gouvfr/dsfr@1.12.1": "patches/@gouvfr%2Fdsfr@1.12.1.patch"
} }
} }

View file

@ -0,0 +1,16 @@
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/dist/component/table/table.module.js b/dist/component/table/table.module.js
index 5d61112f0cdc60ec85adc0c1a39ddabca4c332d2..0de2a3fadaaec783903def5084c4c77add3fc723 100644
--- a/dist/component/table/table.module.js
+++ b/dist/component/table/table.module.js
@@ -157,7 +157,9 @@ class TableRow extends api.core.Instance {
}
_handleCheckboxChange (node) {
- if (node.name === 'row-select') {
+ if (node.name === 'row-select' ||
+ node.getAttribute(api.internals.ns.attr('row-select')) === 'true'
+ ) {
this.isSelected = node.checked === true;
}
}