Skip to content

Fix onSelectItem handler in editable chip skill template#5328

Merged
manuelblum merged 2 commits intocom-2900/add-crud-skillsfrom
copilot/sub-pr-5323-another-one
Mar 16, 2026
Merged

Fix onSelectItem handler in editable chip skill template#5328
manuelblum merged 2 commits intocom-2900/add-crud-skillsfrom
copilot/sub-pr-5323-another-one

Conversation

Copy link
Contributor

Copilot AI commented Mar 16, 2026

The onSelectItem callback in the enum-02-editable-chip.md template incorrectly used destructuring syntax ({enumFieldName}) => ..., treating the parameter as an object — but onSelectItem provides a single enum value (string union). The mutation variables also relied on shorthand notation that would only work if the parameter name matched the field name exactly.

Changes

  • enum-02-editable-chip.md: Replace destructuring parameter with a single (value) argument and explicitly map mutation variables as {enumFieldName}: value

Before:

onSelectItem={({enumFieldName}) => {
    updateMutation({ variables: { id: {entityId}, {enumFieldName} } });
}}

After:

onSelectItem={(value) => {
    updateMutation({ variables: { id: {entityId}, {enumFieldName}: value } });
}}

This aligns the template with the concrete LocationStatus example already present in the same file.


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

…parameter

Co-authored-by: manuelblum <6098356+manuelblum@users.noreply.github.com>
Copilot AI changed the title [WIP] [WIP] Address feedback on comet-crud Agent skills implementation Fix onSelectItem handler in editable chip skill template Mar 16, 2026
Copilot AI requested a review from manuelblum March 16, 2026 20:02
@manuelblum manuelblum marked this pull request as ready for review March 16, 2026 20:35
@manuelblum manuelblum merged commit ab9885b into com-2900/add-crud-skills Mar 16, 2026
2 checks passed
@manuelblum manuelblum deleted the copilot/sub-pr-5323-another-one branch March 16, 2026 20:58
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.

2 participants