Skip to content

implement formselect component#46

Open
jaydeepw wants to merge 1 commit intoPros-Perix:masterfrom
jaydeepw:feature/forms-select
Open

implement formselect component#46
jaydeepw wants to merge 1 commit intoPros-Perix:masterfrom
jaydeepw:feature/forms-select

Conversation

@jaydeepw
Copy link
Copy Markdown
Contributor

@jaydeepw jaydeepw commented Jan 30, 2026

This is the first round of review.

I do see some redundant files, but I am not sure about those. For e.g. theres a test file. But not sure if we are writing any test ATM.

Please suggest and I will make changes accordingly. Also, please make a new releasea of this ASAP coz I need this to be used in Move Bulk Actions sprint. Please find below screenshot.

All components form update is pending on me. Will do it on Monday.

image

Note

Medium Risk
Adds a new exported FormSelect wrapper that wires SelectField into react-hook-form, and extends SelectField’s trigger API; moderate risk due to new form control behavior and prop-surface changes that could affect select rendering/label association.

Overview
Adds FormSelect to @px-ui/forms as a new form abstraction that wraps SelectField with react-hook-form Controller, including passing invalid, inputRef, and wiring label association via trigger id.

Extends SelectField by exporting SelectFieldProps and adding triggerProps support (merged with triggerClassName) so callers can pass extra Select.Trigger props.

Updates Storybook and docs to document/demo FormSelect, and adjusts select/combobox example state typing from undefined to null for “no selection” cases.

Written by Cursor Bugbot for commit 74b72ea. This will update automatically on new commits. Configure here.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on February 11

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

className="w-full max-w-sm space-y-4"
>
<FormSelect
control={control as any}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Demo uses type cast while storybook example doesn't

Low Severity

The demo file uses control={control as any} while the equivalent Storybook example at line 807 of form-abstractions.stories.tsx passes control={control} directly without any type cast. This inconsistency suggests either unnecessary type casting in the demo or a type inference issue that should be fixed. Since this demo is rendered in user-facing documentation and users may copy this pattern, it sets a bad precedent for how to use FormSelect.

Fix in Cursor Fix in Web

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@irshathcodes please suggest on this. If I assign without keeping this open type, it warns in the editor.

@irshathcodes
Copy link
Copy Markdown
Collaborator

We will create form abstractions for dropdowns later.

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