diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f370541..153f3f27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ https://github.com/anvilistas/anvil-extras/pull/121 * storage - update and clear were missing from the documented api https://github.com/anvilistas/anvil-extras/pull/125 +* PageBreak - fix margin_top property and make it optional + https://github.com/anvilistas/anvil-extras/pull/137 ## Updates * Slider Component - bump javascript dependency and refactor. No changes to the component's public API. diff --git a/client_code/PageBreak/__init__.py b/client_code/PageBreak/__init__.py index ea4e6844..5cabf103 100644 --- a/client_code/PageBreak/__init__.py +++ b/client_code/PageBreak/__init__.py @@ -13,7 +13,7 @@ class PageBreak(PageBreakTemplate): - def __init__(self, margin_top, **properties): + def __init__(self, margin_top=0, **properties): self.margin_node = _S(anvil.js.get_dom_node(self)).find(".margin-element") self.margin_top = margin_top self.init_components(**properties) diff --git a/client_code/PageBreak/form_template.yaml b/client_code/PageBreak/form_template.yaml index 613517f5..01ce44b8 100644 --- a/client_code/PageBreak/form_template.yaml +++ b/client_code/PageBreak/form_template.yaml @@ -3,11 +3,12 @@ container: properties: {tooltip: '', background: '', foreground: '', border: '', visible: true, role: null, html: "\n