-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
fix: product options catch-all improvements #14343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: chore/add-many-to-many-between-product-and-option
Are you sure you want to change the base?
fix: product options catch-all improvements #14343
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 8 Skipped Deployments
|
|
… feat/catch-all-tickets
… feat/catch-all-tickets
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is being reviewed by Cursor Bugbot
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.
...roduct-options-manage/components/product-options-manage-form/product-options-manage-form.tsx
Show resolved
Hide resolved
| enabled: !!selectedOptionIds.length, | ||
| } | ||
| ) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: New options may submit with undefined value_ids
When a user adds a new global option, handleProductOptionSelect attempts to initialize its values from product_options. However, since useProductOptions now fetches only by selectedOptionIds, the newly selected option isn't available in product_options until the query re-runs. The new option's values never get initialized in selectedOptionValues. On form submit, data.option_values[newId] evaluates to undefined, resulting in { id: newId, value_ids: undefined } being sent to the backend, which could cause API errors.
What
deleteProductsworkflowCLOSES CORE-1316
CLOSES CORE-1317
CLOSES CORE-1318
CLOSES CORE-1320
CLOSES CORE-1321