-
Notifications
You must be signed in to change notification settings - Fork 117
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
support data-suggest- or data-default- with data-set- #2817
Comments
Thanks, I'll take a look. |
Hi, I'm circling back to this now. I think this is the scenario you describe correct? steps to replicate:
expected behavior: actual behavior: my answer Basically you're hitting this bit. You changed something (the reservation) we're trying to propagate that event to other event handlers in case they have some related relationship. Obviously the choice of So it's not just that we're handling change events - it's more like when something does change, we may need to change other elements of the form given these secondary relationships like the choice of pytorch forcing R3. ondemand/apps/dashboard/app/javascript/packs/batch_connect.js Lines 715 to 716 in 6259e46
All that said - given pytorch's data-set-reservation directive, it seems to me that this is the correct behaviour. That you would want to keep/force R3 when pytorch is chosen. I know it may be different behavior from 2.0 , but does it make sense to keep/force R3 when pythorch is chosen? |
Yes, that does seem to be the correct scenario. So far we've been using these |
Maybe we need a We're mostly using data-set to set hidden values like reservation + account combinations where you choose the account but the reservation is automatically set to something. Happy to have the conversation about expanding this to suit your needs. |
I feel like the current In this particular edge case (issue) it seems like checking if the select option value has changed before applying |
OK - I'll turn this ticket into a feature request, though I can't put it in 3.1 yet. How about some scheme like:
|
That sounds good. |
I happened to find a case where the dynamic form JS (
BC_DYNAMIC_JS
) does not behave as I would expect it to behave in 3.0, and here is an small example case where it happens.This seems to happen when a field A (project) depends (
data-option-for
) on field B (reservation), field C (module) depends on field A (project) and sets (data-set
) field B (reservation).In the example config below, setting the project to
project_1
with modulepytorch
makes it impossible to change the reservation, even though onlyR4
would be an invalid reservation for that particular module and project combination. Meanwhile, the version field, set in the same way as the reservation, is freely selectable.Changing
data-option-for-reservation-R4: false
on the project field to some value that does not even exist, e.g.data-option-for-reservation-R5: false
, or even justdata-option-for-reservation-R4: true
still causes the same behaviour.This behaviour seems to occur in 3.0.1, but not in 2.0.32 where it works properly, i.e. reservation freely selectable, but set to correct default value.
Form config example:
┆Issue is synchronized with this Asana task by Unito
The text was updated successfully, but these errors were encountered: