From 753c6028028bca773127e83940d324cb3caa7c64 Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Tue, 12 Nov 2024 14:57:09 +0100 Subject: [PATCH] chore(js): patch dsfr/table to use data attr instead of name on checkbox --- bun.lockb | Bin 580300 -> 580488 bytes package.json | 3 +++ patches/@gouvfr%2Fdsfr@1.12.1.patch | 16 ++++++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 patches/@gouvfr%2Fdsfr@1.12.1.patch diff --git a/bun.lockb b/bun.lockb index dacbd6c63cea1767681fd743c2612d01d776349b..a3ae1b76d94a58d934a43d1abc59164e4f084ef6 100755 GIT binary patch delta 268 zcmX@JRk>rk@&rG|AC3O4{*0~uOs)RRt^O>n{;aM3Y+L==Gp(3}Znf{SV&A^Yio
  • %M>*CIad3JgaplW{r4dyOjm9Y!}J1)f~wZKln$OMa4{`rgy$_xw*FelEi QD2}`7+IV_;qdCh20QK`yp#T5? delta 100 zcmeC!u6$;z@&rFdn@0auf5ujSrdEIER)3aOf7Vuiwypl`nO02iZ?^BUV&A^Yio
  • *i6^H#i7a%WFK9yS3yA8);S>Ow#W2FbCwAJOUWK( diff --git a/package.json b/package.json index eb9a004c2..01c2be0ea 100644 --- a/package.json +++ b/package.json @@ -195,5 +195,8 @@ } } ] + }, + "patchedDependencies": { + "@gouvfr/dsfr@1.12.1": "patches/@gouvfr%2Fdsfr@1.12.1.patch" } } diff --git a/patches/@gouvfr%2Fdsfr@1.12.1.patch b/patches/@gouvfr%2Fdsfr@1.12.1.patch new file mode 100644 index 000000000..cd69bef22 --- /dev/null +++ b/patches/@gouvfr%2Fdsfr@1.12.1.patch @@ -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; + } + }