Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default value <none> is serialized as "<none>" in the schema when using [email protected] #1282

Closed
Skaiir opened this issue Sep 29, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@Skaiir
Copy link
Contributor

Skaiir commented Sep 29, 2024

Describe the Bug

Whenever using more recent versions of preact, the default value is serialized as "" in the schema, we want it to be serialized as no value at all.

Steps to Reproduce

  1. update preact in the lockfile to 10.15.1
  2. create a select component
  3. set default value to none
  4. inspect schema
  5. "<none>" is serialized

Expected Behavior

  1. nothing should be serialized
@Skaiir Skaiir added the bug Something isn't working label Sep 29, 2024
@Skaiir Skaiir self-assigned this Sep 29, 2024
@Skaiir
Copy link
Contributor Author

Skaiir commented Sep 29, 2024

RCA

The issue stems from the fact that newer versions of preact (correctly) serialize <option value={null}>label</option> to <option>label</option>, which is expected.

For sanity we should update the preact version we test on to 10.15.1 (we can't go further with this because of #1216). This means changing the lockfile. Also, we need to use value "" instead of null to fix the actual bug.

@Skaiir
Copy link
Contributor Author

Skaiir commented Sep 30, 2024

Closed via #1283

@Skaiir Skaiir closed this as completed Sep 30, 2024
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant