You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also is there any way to capture the duplicateEvent? The issue i'm facing is while duplicating the component it creating copy with same id value for it and hence when trying to update my db, it throws error as there is primary key constraint on the id column. I need some way to control this duplicate action.
In #461, @sagarchoudhary96 mentions the requirement for better handling/access to the duplication action.
I ran into problems similar to those in my implementation, which is leveraging additional metadata behind the scenes. Rather than exposing the entire Dropzone context and dispatch function, perhaps we can update the duplicate action to add a flag to the duplicated and change the ID such as isDuplicate={true}?
Then, when using the onPublish, we could alter the data/behaviour before sending the payload to the server. Are there any reasons we shouldn't just do this?
constnewItem={
...item,props: {
...item.props,id: generateId(item.type),// Track if the item is a duplicateisDuplicate: true},};
@sagarchoudhary96 I am confused by the output you've provided in your screenshot. id is a string of {type}-{uuid} in the props object, not the main component object. Are you setting that value yourself somehow?
Also is there any way to capture the duplicateEvent? The issue i'm facing is while duplicating the component it creating copy with same id value for it and hence when trying to update my db, it throws error as there is primary key constraint on the id column. I need some way to control this duplicate action.
Originally posted by @sagarchoudhary96 in #461 (comment)
The text was updated successfully, but these errors were encountered: