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

[ListComponentBase] maintain consistency between SelectedOption and Value #1149

Merged
merged 2 commits into from
Dec 18, 2023

Conversation

pk9r
Copy link
Contributor

@pk9r pk9r commented Dec 18, 2023

Pull Request

📖 Description

This commit ensures that SelectedOption and Value consistently reflect each other. When SelectedOption is updated, Value is adjusted to maintain coherence, and conversely, changes to Value are reflected in the corresponding adjustment of SelectedOption. This fixes #983

🎫 Issues

fix: Bind parameter values not updating FluentSelect component #983

👩‍💻 Reviewer Notes

I added TOption? _currentSelectedOption into ListComponentBase, when SelectedOption or Value changes I will update _currentSelectedOption then update SelectedOption or (and) Value.

I handle the case where SelectedOption is set but its value is not in the list of Items or the case where Items is not set (Items is null). The case of Value is set but the value does not match the list of Items is also handled, please see it.

📑 Test Plan

✅ Checklist

General

  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

⏭ Next Steps

I don't have this

La Minh Phuc and others added 2 commits December 18, 2023 14:09
…on and Value when Multiple is false

This commit ensures that `SelectedOption` and `Value` consistently reflect each other. When `SelectedOption` is updated, `Value` is adjusted to maintain coherence, and conversely, changes to `Value` are reflected in the corresponding adjustment of `SelectedOption`.
This fixes microsoft#983
@vnbaaij vnbaaij enabled auto-merge (squash) December 18, 2023 09:27
@vnbaaij vnbaaij merged commit b7ad573 into microsoft:dev Dec 18, 2023
3 of 4 checks passed
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.

fix: Bind parameter values not updating FluentSelect component
2 participants