Convert JSX-unsupported checkbox and select props to JSX-supported ones

Created on 8 December 2023, 9 months ago

Problem/Motivation

The "selected" attribute on <option> tags and the "checked" attribute on type="checkbox" inputs are not supported by JSX.

Steps to reproduce

Proposed resolution

Preprocess these elements to use the JSX supported attributes.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

1.0

Component

JSX Theme Engine

Created by

πŸ‡ΊπŸ‡ΈUnited States bnjmnm Ann Arbor, MI

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @bnjmnm
  • πŸ‡ΊπŸ‡ΈUnited States effulgentsia

    Thanks for finding these. I think the proper place to fix it would be in https://github.com/drupal-jsx/propsify/blob/main/strict.js. Also in the petite.js file in that same repo if the same change is needed for Preact/Solid, but not if it's only for React.

    Umami JSX isn't using the above module yet, so until it does, fixing it in this PHP branch is a reasonable stopgap.

  • πŸ‡ΊπŸ‡ΈUnited States bnjmnm Ann Arbor, MI

    Addressing the checkbox issue could go in propsify (and I just filed a PR for a different issue in that repo so I'm in the flow there).

    The select/option one is a little tricker - it moves the selected info from the <option> element to the parent <select> element, so it winds up being a bit more involved than renaming the props. Because of this I'm a little on the fence where the best home for that fix is.

Production build 0.71.5 2024