Skip to content

fix: array component does not support multiple image selection#8360

Merged
f2c-ci-robot[bot] merged 1 commit into
halo-dev:mainfrom
LIlGG:fix/array-multi-data-echo
Feb 26, 2026
Merged

fix: array component does not support multiple image selection#8360
f2c-ci-robot[bot] merged 1 commit into
halo-dev:mainfrom
LIlGG:fix/array-multi-data-echo

Conversation

@LIlGG

@LIlGG LIlGG commented Feb 24, 2026

Copy link
Copy Markdown
Member

What type of PR is this?

/kind bug
/area ui

What this PR does / why we need it:

解决 array 组件无法处理 attachement 之类可多选的图片组件的渲染。

Which issue(s) this PR fixes:

Fixes #8354

Does this PR introduce a user-facing change?

解决 Array 无法支持图片多选的渲染问题

Allow renderer functions to return either a single LabelValueResult or an array of them and handle those arrays when formatting item labels. Adds a new attachment renderer and registers it. Update types (LabelValueRenderer) and renderItemLabelValue signature to accept array results, update ArrayInput parsing to normalize/flatten renderer outputs (use toArray) and map array responses into FormattedItemLabel entries.

Files changed: ArrayInput.vue (handle array renderer results, import toArray), renderers/index.ts (register attachment renderer, update import/exports), renderers/types.ts (broaden renderer return types), renderers/attachment.ts (new attachment renderer).
@f2c-ci-robot f2c-ci-robot Bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. area/ui Issues or PRs related to the Halo UI labels Feb 24, 2026
@LIlGG LIlGG added this to the 2.23.x milestone Feb 24, 2026
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Feb 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.83%. Comparing base (42c374d) to head (09d6572).
⚠️ Report is 459 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8360      +/-   ##
============================================
+ Coverage     59.55%   60.83%   +1.27%     
- Complexity     3812     3999     +187     
============================================
  Files           677      698      +21     
  Lines         23248    23856     +608     
  Branches       1500     1555      +55     
============================================
+ Hits          13846    14513     +667     
+ Misses         8764     8613     -151     
- Partials        638      730      +92     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ruibaby ruibaby left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@f2c-ci-robot f2c-ci-robot Bot added the lgtm Indicates that a PR is ready to be merged. label Feb 26, 2026
@f2c-ci-robot

f2c-ci-robot Bot commented Feb 26, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ruibaby

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 26, 2026
@f2c-ci-robot f2c-ci-robot Bot merged commit 76570a7 into halo-dev:main Feb 26, 2026
10 checks passed
f2c-ci-robot Bot pushed a commit that referenced this pull request Mar 2, 2026
…ay (#8378)

#### What type of PR is this?

/kind bug
/area ui
/milestone 2.23.x

#### What this PR does / why we need it:

解决 Array 中数据渲染可能为空的问题,这个问题应该是由 #8360 引入的

#### Does this PR introduce a user-facing change?
```release-note
None
```
@ruibaby ruibaby modified the milestones: 2.23.x, 2.23.0 Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/ui Issues or PRs related to the Halo UI kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Array 组件无法支持图片多选回显

2 participants