Fix: adjust attribute name "disable" to match what is defined in multi-select.js#3014
Fix: adjust attribute name "disable" to match what is defined in multi-select.js#3014chrisknoll merged 2 commits intoOHDSI:masterfrom
Conversation
|
CC @anthonysena |
anthonysena
left a comment
There was a problem hiding this comment.
I think I introduced this bug based on the work you noted here: https://github.com/OHDSI/Atlas/pull/2975/files#r2040084688. Shouldn't we change the multi-select component to use disabled since that is the desired HTML attribute?
|
A few notes on this:
Given the above, does the attr:disabled binding work the way we think? I imagine it would based on that I think we've seen correct disabled behavior here. In the context of this PR, we need to call the attribute 'disabled' (the view model variable name doesn't matter). But would it be more appropriate to associate the disabled data binding to this function instead of the proper naming of the HTML dom attribute? |
e8867a3 to
45fc05a
Compare
|
thanks for the review! I changed it based on @chrisknoll 's shared link https://knockoutjs.com/documentation/enable-binding.html. Maybe you can try it to see if it works in the scenarios you intended it for? The solution is maybe still not correct if the intention is to have the enabled/disabled status change dynamically in a reactive way in the UI. |
anthonysena
left a comment
There was a problem hiding this comment.
Thanks for sharing those resources @chrisknoll and to @pieterlukasse for making the updates. The intent with the disable property of the component is to use the disabled HTML attribute so these changes look good from my side.
|
Thanks @pieterlukasse . In the future, can you please not force push branches that have been made into a PR? I think this causes issues where people have pulled down the branch locally and then try to pull again but their parent commit looks different than the forced commit that was pushed to the server, and it leads to strange messages (like you have un-pushed local changes when you try to pull a second time). |
|
To answer your question about if it works dynamicaly: The view-model field that the HTML template is binding to is called 'disable', defined here: It will respond dynamically depending on what is in the
|
See also https://github.com/OHDSI/Atlas/pull/2975/files#r2040084688
Fixes error below: