Skip to content

Presever other values in HookedInputCheckboxGroup#1149

Open
gciotola wants to merge 1 commit into
mainfrom
fix/625-input-checkbox-group
Open

Presever other values in HookedInputCheckboxGroup#1149
gciotola wants to merge 1 commit into
mainfrom
fix/625-input-checkbox-group

Conversation

@gciotola
Copy link
Copy Markdown
Contributor

@gciotola gciotola commented May 29, 2026

Related to commercelayer/issues-app#625

Description

Fix HookedInputCheckboxGroup stripping consumer-defined extra fields (e.g. reason) from form state when a checkbox is toggled. The onChange handler now merges incoming SelectedItem[] with the existing field.value, preserving any extra properties set via setValue.

Added an Array.isArray guard with per-item shape validation to safely handle malformed form state.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 29, 2026

Deploy Preview for commercelayer-app-elements ready!

Name Link
🔨 Latest commit ca88e9d
🔍 Latest deploy log https://app.netlify.com/projects/commercelayer-app-elements/deploys/6a1953ccac74100008750860
😎 Deploy Preview https://deploy-preview-1149--commercelayer-app-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@gciotola gciotola self-assigned this May 29, 2026
@gciotola gciotola added the bug Something isn't working label May 29, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 29, 2026

npm i https://pkg.pr.new/commercelayer/app-elements/@commercelayer/app-elements@1149

commit: ca88e9d

@gciotola gciotola changed the title Input checkbox group Presever other values in HookedInputCheckboxGroup May 29, 2026
@gciotola gciotola marked this pull request as ready for review May 29, 2026 08:37
@gciotola gciotola requested a review from Copilot May 29, 2026 08:38

This comment was marked as resolved.

@gciotola gciotola force-pushed the fix/625-input-checkbox-group branch from 320ad04 to ca88e9d Compare May 29, 2026 08:52
@gciotola gciotola requested a review from Copilot May 29, 2026 09:01
Copy link
Copy Markdown
Contributor

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.

Pull request overview

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

Copy link
Copy Markdown

@Randagio13 Randagio13 left a comment

Choose a reason for hiding this comment

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

Well done

Copy link
Copy Markdown
Member

@acasazza acasazza left a comment

Choose a reason for hiding this comment

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

Well done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants