@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.
@@ -2247,6 +2247,12 @@ class WebsyForm {
2247
2247
  clear () {
2248
2248
  const formEl = document.getElementById(`${this.elementId}Form`)
2249
2249
  formEl.reset()
2250
+ if (!this.options.fields) {
2251
+ this.options.fields = []
2252
+ }
2253
+ this.options.fields.forEach(f => {
2254
+ this.setValue(f.field, '')
2255
+ })
2250
2256
  this.loader.hide()
2251
2257
  }
2252
2258
  get data () {
@@ -4165,7 +4171,7 @@ class WebsyResultList {
4165
4171
  }
4166
4172
  this.options = Object.assign({}, DEFAULTS, options)
4167
4173
  this.elementId = elementId
4168
- this.rows = []
4174
+ this.rows = this.options.data || []
4169
4175
  this.apiService = new WebsyDesigns.APIService('/api')
4170
4176
  this.templateService = new WebsyDesigns.APIService('')
4171
4177
  this.activeTemplate = ''