@websy/websy-designs 1.11.14 → 1.11.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2452,6 +2452,12 @@ class WebsyForm {
2452
2452
  clear () {
2453
2453
  const formEl = document.getElementById(`${this.elementId}Form`)
2454
2454
  formEl.reset()
2455
+ if (!this.options.fields) {
2456
+ this.options.fields = []
2457
+ }
2458
+ this.options.fields.forEach(f => {
2459
+ this.setValue(f.field, '')
2460
+ })
2455
2461
  this.loader.hide()
2456
2462
  }
2457
2463
  get data () {
@@ -4609,7 +4615,7 @@ class WebsyResultList {
4609
4615
  }
4610
4616
  this.options = Object.assign({}, DEFAULTS, options)
4611
4617
  this.elementId = elementId
4612
- this.rows = []
4618
+ this.rows = this.options.data || []
4613
4619
  this.apiService = new WebsyDesigns.APIService('/api')
4614
4620
  this.templateService = new WebsyDesigns.APIService('')
4615
4621
  this.activeTemplate = ''