kopia lustrzana https://github.com/wagtail/wagtail
fix issue where nested inline panel fix broke inline panel ordering/delete
rodzic
3546609a7d
commit
2ff4a62a1b
|
@ -165,7 +165,7 @@ function InlinePanel(opts) { // lgtm[js/unused-local-variable]
|
|||
// eslint-disable-next-line no-undef
|
||||
buildExpandingFormset(opts.formsetPrefix, {
|
||||
onAdd(formCount) {
|
||||
const newChildPrefix = opts.emptyChildFormPrefix.replace(/__prefix__(.*?['"])/g, formCount + '$1');
|
||||
const newChildPrefix = opts.emptyChildFormPrefix.replace(/__prefix__/g, formCount);
|
||||
self.initChildControls(newChildPrefix);
|
||||
if (opts.canOrder) {
|
||||
/* NB form hidden inputs use 0-based index and only increment formCount *after* this function is run.
|
||||
|
|
Ładowanie…
Reference in New Issue