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

Options defined through feel expressions aren't dynamic #809

Closed
Skaiir opened this issue Sep 20, 2023 · 4 comments · Fixed by #811
Closed

Options defined through feel expressions aren't dynamic #809

Skaiir opened this issue Sep 20, 2023 · 4 comments · Fixed by #811
Assignees
Labels
bug Something isn't working

Comments

@Skaiir
Copy link
Contributor

Skaiir commented Sep 20, 2023

Describe the Bug

firefox_H4t38wCPEc

As seen above, changing the isGood variable does not affect the select's values, which is unexpected

Steps to Reproduce

  1. add a checkbox with key isGood
  2. add a select with options expression if isGood then [ "good"] else ["bad"]
  3. toggle the checkbox and check the select values
  4. nothing changes

Expected Behavior

The select's values should be dynamically evaluated.

Environment

  • Host Web modeler saas
@Skaiir Skaiir added bug Something isn't working ready Ready to be worked on labels Sep 20, 2023
@Skaiir
Copy link
Contributor Author

Skaiir commented Sep 20, 2023

My guess is that we don't recalculate the options every time we open the dropdown.

I see two ways of fixing this:

  1. We don't consider performance and recalculate every time
  2. We somehow make our feel hook clever enough to recalculate every time a variable changes. This is probably scary to implement.

@bpmn-io-tasks bpmn-io-tasks bot added in progress Currently worked on and removed ready Ready to be worked on labels Sep 21, 2023
@pinussilvestrus
Copy link
Contributor

We don't consider performance and recalculate every time

Verified this works via fb055ad

I will add more test coverage for this one and check whether it works sufficiently.

@Skaiir
Copy link
Contributor Author

Skaiir commented Sep 24, 2023

While this is not release breaking IMO, there is kind of a nuance with this new options case. Since we can now modify the options at field runtime, we should reset the fields when the proper values are not available. Otherwise we get this:

grafik

@Skaiir
Copy link
Contributor Author

Skaiir commented Sep 24, 2023

Raised it here: #817

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

Successfully merging a pull request may close this issue.

2 participants