-
Notifications
You must be signed in to change notification settings - Fork 634
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
Fix unintended serialization of the SelectedIndex for Input nodes #12087
Conversation
@@ -92,7 +92,7 @@ public class NodeInputData | |||
/// The index of the selected item. | |||
/// </summary> | |||
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)] | |||
public int SelectedIndex { get; set; } | |||
public int? SelectedIndex { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's likely this is an API break.
I don't know if we care - but I think it fits in:
❌ DISALLOWED: Changing the type of a member
The return value of a method or the type of a property or field cannot be modified. For example, the signature of a method that returns an Object cannot be changed to return a String, or vice versa.
this may cause binary compatibility issues with any code that referenced this member, can you check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you are right. That was my reading of it as well. I do think we should probably make the change though. I will double check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mjkkirschner Yep it does fail if you directly read or set the SelectedIndex
but I think we should fix this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey - finally time to do this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marked as 3.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep let's do this. Just updated the branch @mjkkirschner @QilongTang
Purpose
This sets the SelectedIndex to nullable so that it does not serialize with every input type. This key / value should only be serialized when the input type is a DropDown.
Declarations
Check these if you believe they are true
*.resx
filesReviewers
@mjkkirschner @nate-peters
FYIs
@BogdanZavu