Commit 4e529bf
committed
Fix LovCombo dropping string selections under native RegExp.escape
Newer browsers (Chrome, Firefox 140+) ship a native RegExp.escape that throws a TypeError on non-String input. Ext.ux.form.LovCombo.setValue() previously passed JSON.stringify(value) to RegExp.escape to avoid that, but JSON.stringify() quotes string values, so they no longer matched the raw, unquoted output of getCheckedValue() and every selection in a string-valued combo (e.g. the WNPRC EHR Time of Day multi-select) was silently dropped. Use String() instead: it yields a valid String for RegExp.escape without quoting string values, fixing both the numeric-valueField crash and the string-valueField regression.
LabKey/internal-issues#12661 parent 71205aa commit 4e529bf
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
| 296 | + | |
| 297 | + | |
296 | 298 | | |
297 | | - | |
| 299 | + | |
298 | 300 | | |
299 | 301 | | |
300 | 302 | | |
| |||
0 commit comments