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

The default value of a select field with static options stays when you switch to expression input #859

Closed
christian-konrad opened this issue Oct 21, 2023 · 1 comment
Assignees
Labels
bug Something isn't working spring cleaning Could be cleaned up one day

Comments

@christian-konrad
Copy link
Contributor

christian-konrad commented Oct 21, 2023

Describe the Bug

The default value of a select field with static options stays when you switch to expression input.
This leads to confusing behavior, and to remove the default value, one has to turn back to static values, remove the default, and return to expression input again.

  • If the default value isn't part of the expression input options, it is not visible, but still returned as output
  • If the default value is part of the expression input options, it is also visible

Steps to Reproduce

  1. Add select field, add a static option, and pick it as default
  2. Switch input source to expression
  3. Add any expression as input
  4. --> The default is still in the output data, or even visible if it is represented in the new input options
Bildschirmaufnahme.2023-10-21.um.09.40.39.mov

Expected Behavior

The default value should be cleared when switching to other input sources (expressions or key).

Either no value is preselected (preferred to avoid bias - only when default is set!), or the serialization is fixed

Environment

Form editor in Web Modeler SaaS as of Oct 21 2023

@christian-konrad christian-konrad added the bug Something isn't working label Oct 21, 2023
@christian-konrad christian-konrad changed the title First value in a select field is preselected and serialized as string, even if it's a number The default value of a select field with static options stays when you switch to expression input Oct 21, 2023
@pinussilvestrus
Copy link
Contributor

As we do not support default values for values key and expressions, we should clean them up once we change the values type - as we already do with other properties.

We could consider adding a modeling behavior for this.

@pinussilvestrus pinussilvestrus added backlog Queued in backlog spring cleaning Could be cleaned up one day ready Ready to be worked on and removed backlog Queued in backlog labels Oct 23, 2023
@bpmn-io-tasks bpmn-io-tasks bot added in progress Currently worked on and removed ready Ready to be worked on labels Nov 1, 2023
@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending and removed in progress Currently worked on labels Nov 1, 2023
pinussilvestrus pushed a commit that referenced this issue Nov 1, 2023
pinussilvestrus pushed a commit that referenced this issue Nov 2, 2023
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working spring cleaning Could be cleaned up one day
Projects
None yet
Development

No branches or pull requests

2 participants