Quellcode durchsuchen

Release note for InlinePanel refactor

Matt Westcott vor 2 Jahren
Ursprung
Commit
52c50e0e67
1 geänderte Dateien mit 7 neuen und 0 gelöschten Zeilen
  1. 7 0
      docs/releases/4.2.md

+ 7 - 0
docs/releases/4.2.md

@@ -122,3 +122,10 @@ If these are used within packages or customisations they will need to be updated
 | `paginate`          | `{% paginate pages classname="..." %}`                                                                 | `{% paginate pages classnames="..." %}`                                                              |
 | `tab_nav_link`      | `{% include 'wagtailadmin/shared/tabs/tab_nav_link.html' with classname="..." %}`                      | `{% include 'wagtailadmin/shared/tabs/tab_nav_link.html' with classes="..." %}`                      |
 | `side_panel_button` | `{% include 'wagtailadmin/shared/side_panels/includes/side_panel_button.html' with classname="..." %}` | `{% include 'wagtailadmin/shared/side_panels/includes/side_panel_button.html' with classes="..." %}` |
+
+
+### `InlinePanel` JavaScript function is now a class
+
+The (internal, undocumented) `InlinePanel` JavaScript function, used to initialise client-side behaviour for inline panels, has been converted to a class. Any user code that calls this function should now replace `InlinePanel(...)` calls with `new InlinePanel(...)`. Additionally, child form controls are now initialised automatically, and so it is no longer necessary to call `initChildControls`, `updateChildCount`, `updateMoveButtonDisabledStates` or `updateAddButtonState`.
+
+Python code that uses the `InlinePanel` panel type is not affected by this change.