diff --git a/docs/source/about/changelog.rst b/docs/source/about/changelog.rst index 7587273ec..3db857a26 100644 --- a/docs/source/about/changelog.rst +++ b/docs/source/about/changelog.rst @@ -25,14 +25,15 @@ Unreleased **Removed** -- :pull:`840` - remove ``IDOM_FEATURE_INDEX_AS_DEFAULT_KEY`` option +- :pull:`840` - Remove ``IDOM_FEATURE_INDEX_AS_DEFAULT_KEY`` option - :pull:`835` - ``serve_static_files`` option from backend configuration **Added** -- :pull:`835` - ability to customize the ``
`` element of IDOM's built-in client. +- :pull:`835` - Ability to customize the ```` element of IDOM's built-in client. - :pull:`835` - ``vdom_to_html`` utility function. - :pull:`843` - Ability to subscribe to changes that are made to mutable options. +- :pull:`699` - Support for form element serialization **Fixed** diff --git a/src/client/packages/idom-client-react/src/event-to-object.js b/src/client/packages/idom-client-react/src/event-to-object.js index b11e65366..e35f652e5 100644 --- a/src/client/packages/idom-client-react/src/event-to-object.js +++ b/src/client/packages/idom-client-react/src/event-to-object.js @@ -49,6 +49,20 @@ const elementTransformCategories = { return {}; } }, + hasElements: (element) => { + const { elements } = element; + const indices = [...Array(elements.length).keys()]; + return { + elements: indices.map((index) => serializeDomElement(elements[index])), + }; + }, + hasName: (element) => { + const { name } = element; + // In some edge cases, "name" may not be a string. For example, in the case of + // ``, the "name" attribute of the `