Tangerine-Community / tangy-form

<tangy-form> is a web component for creating multipage forms. Other <tangy-*> input elements are included as well.
GNU General Public License v3.0
15 stars 3 forks source link

Add sectionEnable function back to tangy-form #207

Closed esurface closed 3 years ago

esurface commented 3 years ago

Looks like sectionEnable function was dropped in v4.23.0 (Bad merge?). I noticed this because calling 'sectionEnable' is no longer a function in tangerine-preview

commit 5317dce6890f7b79558a31cbda26dfa16080b764
Author: R.J. Steinert <rj@rjsteinert.com>
Date:   Mon Feb 22 07:23:56 2021 -0500

    Add skip and unskip to tangy-form callback helpers

diff --git a/tangy-form.js b/tangy-form.js
index 8385f1f..5282d79 100644
--- a/tangy-form.js
+++ b/tangy-form.js
@@ -686,7 +686,8 @@ export class TangyForm extends PolymerElement {
     let tangyFormStore = this.store
     let itemEnable = name => this.itemEnable(name)
     let itemDisable = name => this.itemDisable(name)
-    let sectionEnable = name => this.itemEnable(name)
+    let skip = name => this.itemDisable(name)
+    let unskip = name => this.itemEnable(name)
     let sectionDisable = name => this.itemDisable(name)
     let helpers = new TangyFormItemHelpers(this)
     let getValue = (name) => this.getValue(name)