修复自动生成列时CheckBoxList数据绑定中的一处bug#8270
Open
Tony-ST0754 wants to merge 1 commit into
Open
Conversation
fix:修复自动生成列为CheckBoxList组件时,数据绑定的Bug,导致每次只能单选的问题
Contributor
|
🧙 Sourcery has finished reviewing your pull request! Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Now that the CheckboxList uses the original item.Items instance instead of a clone, consider making Items immutable (e.g., using a read-only collection) or clearly constraining external mutation to avoid subtle side effects from shared state across components.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Now that the CheckboxList uses the original item.Items instance instead of a clone, consider making Items immutable (e.g., using a read-only collection) or clearly constraining external mutation to avoid subtle side effects from shared state across components.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8270 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 769 769
Lines 34436 34436
=========================================
Hits 34436 34436
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix:修复自动生成列为CheckBoxList组件时,数据绑定的Bug,导致每次只能单选的问题
Link issues
fixes #8265
问题描述 / Problem Description
当Table组件中绑定的数据采用自动生成列时,有字段属性对应生成为
CheckBoxList组件时,会出现每次只能选中一个,关掉编辑弹窗后,才能再次选中/取消另一个根本原因 / Root Cause
在
EditorForm组件中自动生成编辑窗体的数据模板时,对CheckBoxList组件的Items赋值时采用了克隆,因此导致每次会创建新的实例解决方案 / Solution
修改
Utility.cs中自动生成编辑弹窗中组件的方法,代码如下所示:Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Bug Fixes: