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
Is your feature request related to a problem? Please describe.
In a many to many scenario where I have partner => channelPartner => paymentChannel tables.
channelPartner table stores additional information about the related records like commission rates.
I'm listing all the paymentChannels in the edit page of partner.
In case there's no record in channelPartner which links these 2 records I want it to navigate to the create page of channelPartner with the foreignKeys are prefilled.
Describe the solution you'd like
ReferenceOneField links to edit page of the referenced resource by default which is great. But if there's no referenced record I want to create a record. If I could add a link to create page on empty records that'd be simple to implement this feature.
Something like this:
function(){return(<Editresource={'partner'}><SimpleForm><TextInputsource="name"/><ListBaseresource={"paymentChannel"}><Datagrid><TextFieldsource="name"/>{/*If there's no record in the junction table (channelPartner), I want to link to create page */}<ReferenceOneFieldreference={"channelPartner"}target={"paymentChannelId"}label={'Deposit Commision'}//This would be greatemptyContent={<Buttonto={'channelPartner/create'}/>}/></Datagrid></ListBase></SimpleForm></Edit>)}
Describe alternatives you've considered
I'm still exploring. Not found a solution yet.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
In a many to many scenario where I have partner => channelPartner => paymentChannel tables.
channelPartner table stores additional information about the related records like commission rates.
I'm listing all the paymentChannels in the edit page of partner.
In case there's no record in channelPartner which links these 2 records I want it to navigate to the create page of channelPartner with the foreignKeys are prefilled.
Describe the solution you'd like
ReferenceOneField links to edit page of the referenced resource by default which is great. But if there's no referenced record I want to create a record. If I could add a link to create page on empty records that'd be simple to implement this feature.
Something like this:
Describe alternatives you've considered
I'm still exploring. Not found a solution yet.
The text was updated successfully, but these errors were encountered: