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

🆕 feat(Cascader): support binding value for List<TItemValue> type #2340

Merged
merged 2 commits into from
Mar 4, 2025

Conversation

capdiem
Copy link
Contributor

@capdiem capdiem commented Mar 3, 2025

Resolves #2270

@capdiem capdiem requested a review from Copilot March 3, 2025 09:34
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

PR Overview

This pull request introduces support for binding values of type List in Cascader components while refactoring generic type parameters and updating related examples and documentation. Key changes include:

  • Adding a new interface ICascader<TItem, TItemValue> to define cascader behavior.
  • Updating MCascader and related components to support an additional generic parameter TItemValue and handle list binding.
  • Revising examples and documentation to demonstrate the new list binding functionality.

Reviewed Changes

File Description
src/Masa.Blazor/Components/Cascader/ICascader.cs Introduces a new interface to support cascader binding with TItemValue.
src/Masa.Blazor/Components/Cascader/MCascader.razor.cs Refactors generics and updates internal state handling to support List binding.
docs/... Updates documentation and example pages to align with the new cascader binding approach.
src/Masa.Blazor/Components/Select/MSelect.razor.cs Minor change regarding the method signature for OnMenuActiveChange.
src/Masa.Blazor/Components/Cascader/MCascader.razor Updates markup to use new generic parameters and cascader context.
src/Masa.Blazor.Playground/Pages/Index.razor Updates playground usage reflecting new binding types.
docs/Masa.Blazor.Docs/Examples/... Adjusts examples to reflect changes in ItemValue and generic parameters.

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

@Qinyouzeng Qinyouzeng merged commit 8e4b415 into main Mar 4, 2025
1 check passed
@Qinyouzeng Qinyouzeng deleted the cascader-list-value branch March 4, 2025 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Cascader: support getting all selected option values
2 participants