-
Notifications
You must be signed in to change notification settings - Fork 197
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
fix: product-carousel and product-list now sort properly, included append checkbox control #1646
base: vibes/soul-with-makeswift
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Skipped Deployments
|
|
if (product?.entityId) { | ||
return product.entityId.label; | ||
} | ||
|
||
return product?.title || 'Product Title'; |
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.
Interesting. So entity IDs have labels?
Also, why not do this?
return product?.entityId.label ?? product?.title ?? 'Product Title'
@@ -116,7 +141,7 @@ runtime.registerComponent( | |||
} | |||
|
|||
return { | |||
id: title ?? '', | |||
id: index.toString(), |
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.
We should use a stable identifier here instead of the index
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.
Should we be forcing users to enter an ID or something? Alan was saying using index is the most intuitive way outside of entering one in manually. What about ${title}-${index}
?
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.
Don't we have the ID of the product?
…ility to append or prepend
befabf9
to
09cb2d4
Compare
products-list.makeswift.tsx
CleanShot.2024-11-15.at.16.10.14.mp4
products-carousel.makeswift.tsx
CleanShot.2024-11-15.at.16.11.32.mp4