Commit e45ee3f
committed
FIX: Use native checkbox to properly update model on change
The PreferenceCheckbox component doesn't properly propagate checkbox
state changes back to the model when used in plugin outlet contexts.
This caused the subscription preference to not be saved when users
toggled the checkbox.
Replace PreferenceCheckbox with a native checkbox element and an
explicit @action handler that calls model.set() when the checkbox
changes. This ensures the model value is properly updated before
the preferences are saved to the server.1 parent 86a69d7 commit e45ee3f
File tree
1 file changed
+22
-6
lines changed- assets/javascripts/discourse/connectors/user-preferences-emails
1 file changed
+22
-6
lines changedLines changed: 22 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
2 | 4 | | |
3 | | - | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
13 | 22 | | |
14 | 23 | | |
15 | 24 | | |
16 | 25 | | |
17 | 26 | | |
18 | 27 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
24 | 40 | | |
25 | 41 | | |
26 | 42 | | |
| |||
0 commit comments