Skip to content

Remove redundant property changed callback#842

Open
yourordinarycat wants to merge 1 commit intoCommunityToolkit:mainfrom
yourordinarycat:fix/segmented-orientation-callback
Open

Remove redundant property changed callback#842
yourordinarycat wants to merge 1 commit intoCommunityToolkit:mainfrom
yourordinarycat:fix/segmented-orientation-callback

Conversation

@yourordinarycat
Copy link
Copy Markdown

Fixes

There is a redundant property change callback in the Segmented code. It is already covered by the DP registration so this just removes that line.

PR Type

What kind of change does this PR introduce?

Bugfix

What is the current behavior?

There is a redundant callback installed for the orientation prop, and it's the wrong one.

What is the new behavior?

No redundant callback.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • Tested code with current supported SDKs
  • New component
    • Documentation has been added
    • Sample in sample app has been added
    • Analyzers are passing for documentation and samples
    • Icon has been created (if new sample) following the Thumbnail Style Guide and templates
  • Tests for the changes have been added (if applicable)
  • Header has been added to all new source files
  • Contains NO breaking changes

Other information

This is already covered by the DP registration in the properties file.
@yourordinarycat
Copy link
Copy Markdown
Author

@dotnet-policy-service agree

Copy link
Copy Markdown
Member

@Arlodotexe Arlodotexe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the intent here was to wire up the existing OnOrientationChanged callback, we should do that instead of removing the callback registration.

I see, the difference is that SelectedItem is coming from ListViewBase whereas Orientation is added by Segmented. Nevermind, in that case this can be merged as-is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants