Skip to content

Use plain string store for allowedTargets multiselect#1122

Closed
kingjia90 with Copilot wants to merge 8 commits into
2.3from
copilot/fix-code-review-comment-1078
Closed

Use plain string store for allowedTargets multiselect#1122
kingjia90 with Copilot wants to merge 8 commits into
2.3from
copilot/fix-code-review-comment-1078

Conversation

Copilot AI commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

The linked review comment called out the allowedTargets Ext.ux.form.MultiSelect configuration in the link field editor. Its store was being passed as {text} objects instead of the plain string array expected by MultiSelect’s internal ArrayStore handling.

  • Link field editor

    • Changed public/js/pimcore/object/classes/data/link.js to pass this.targets directly as the allowedTargets multiselect store.
    • Left the surrounding field configuration unchanged to keep the fix scoped to the reviewed line.
  • Why this matters

    • Ext.ux.form.MultiSelect supports 1D arrays directly.
    • Using object entries here can break option rendering/selection because of how the component normalizes array-backed stores.
{
    xtype: "multiselect",
    name: "allowedTargets",
    id: "allowedTargets",
    store: this.targets,
    value: this.datax.allowedTargets,
    displayField: "text",
    valueField: "text"
}

jdreesen and others added 7 commits June 29, 2026 10:43
Copilot AI changed the title [WIP] Fix code based on review comment for pull request 1078 Use plain string store for allowedTargets multiselect Jun 29, 2026
Copilot AI requested a review from kingjia90 June 29, 2026 10:45
@sonarqubecloud

Copy link
Copy Markdown

@kingjia90 kingjia90 closed this Jun 29, 2026
@kingjia90 kingjia90 deleted the copilot/fix-code-review-comment-1078 branch June 29, 2026 10:57
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants