Skip to content

Commit 1dcba7c

Browse files
authored
Added checked: element.checked to INPUT in elementConverters (#1126)
1 parent 84cfc56 commit 1dcba7c

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

docs/source/about/changelog.rst

+5-4
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,16 @@ Unreleased
2020

2121
**Fixed**
2222

23-
- :pull:`1118` - `module_from_template` is broken with a recent release of `requests`
24-
- :pull:`1131` - `module_from_template` did not work when using Flask backend
25-
- :pull:`1200` - Fixed `UnicodeDecodeError` when using `reactpy.web.export`
23+
- :pull:`1118` - ``module_from_template`` is broken with a recent release of ``requests``
24+
- :pull:`1131` - ``module_from_template`` did not work when using Flask backend
25+
- :pull:`1200` - Fixed ``UnicodeDecodeError`` when using ``reactpy.web.export``
2626
- :pull:`1224` - Fixes needless unmounting of JavaScript components during each ReactPy render.
27+
- :pull:`1126` - Fixed missing ``event["target"]["checked"]`` on checkbox inputs
2728

2829
**Added**
2930

3031
- :pull:`1165` - Allow concurrently rendering discrete component trees - enable this
31-
experimental feature by setting `REACTPY_ASYNC_RENDERING=true`. This improves
32+
experimental feature by setting ``REACTPY_ASYNC_RENDERING=true``. This improves
3233
the overall responsiveness of your app in situations where larger renders would
3334
otherwise block smaller renders from executing.
3435

src/js/packages/event-to-object/src/index.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,10 @@ const elementConverters: { [key: string]: (element: any) => any } = {
303303
FORM: (element: HTMLFormElement) => ({
304304
elements: Array.from(element.elements).map(convertElement),
305305
}),
306-
INPUT: (element: HTMLInputElement) => ({ value: element.value }),
306+
INPUT: (element: HTMLInputElement) => ({
307+
value: element.value,
308+
checked: element.checked,
309+
}),
307310
METER: (element: HTMLMeterElement) => ({ value: element.value }),
308311
OPTION: (element: HTMLOptionElement) => ({ value: element.value }),
309312
OUTPUT: (element: HTMLOutputElement) => ({ value: element.value }),

0 commit comments

Comments
 (0)