Open danthedeckie opened 3 years ago
Thanks for the report.
This is the JS code that injects the "Select" button: https://github.com/ixc/wagtail-instance-selector/blob/7a62164d620b0fe5798d71e00012877c2ae93174/instance_selector/static/instance_selector/instance_selector_embed.js#L34-L47.
I'm unlikely to have the time to look into this myself, so PRs are welcome.
Actually, could be this block of JS instead: https://github.com/ixc/wagtail-instance-selector/blob/7a62164d620b0fe5798d71e00012877c2ae93174/instance_selector/static/instance_selector/instance_selector_embed.js#L55-L82
If I have open a Instance Selector Panel pop-up, and then create a new object in there to select, it's fine.
But if while it's open, I open an Instance Selector Panel defined on that object - so being 2 levels deep, kind of thing, then when I save the original object, it shows a regular admin listing view - so with 'edit' and 'delete' buttons, and no 'select' button.
Pseudo code:
I've solved currently by switching all of the sub-selectors into a more basic
ModelChooserPanel
that we're using in other places in the project.