@dile/crud 0.0.56 → 0.0.58

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.
@@ -56,10 +56,6 @@ export class DileAjax extends DileAxios(DileI18nMixin(LitElement)) {
56
56
  let res = response.data;
57
57
  if(res.error) {
58
58
  this.dispatchError(res.data);
59
- } else if (res.error === false) {
60
- this.dispatchEvent(new CustomEvent('ajax-success', {
61
- detail: res.data
62
- }));
63
59
  } else {
64
60
  this.dispatchEvent(new CustomEvent('ajax-success', {
65
61
  detail: res
@@ -232,6 +232,9 @@ export class DileAjaxForm extends DileI18nMixin(LitElement) {
232
232
  let data = this.responseAdapter.getData();
233
233
  let msg = this._customSuccessMessage();
234
234
  this.feedback.positiveFeedbackWithDelay(msg, 5000);
235
+ if(this.operation == 'insert') {
236
+ this.form.clearData();
237
+ }
235
238
  this.dispatchEvent(new CustomEvent('save-success', {
236
239
  bubbles: true,
237
240
  composed: true,
@@ -241,9 +244,7 @@ export class DileAjaxForm extends DileI18nMixin(LitElement) {
241
244
  previousDetail: e.detail
242
245
  }
243
246
  }));
244
- if(this.operation == 'insert') {
245
- this.form.clearData();
246
- }
247
+
247
248
  }
248
249
 
249
250
  saveMethod(operation) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dile/crud",
3
- "version": "0.0.56",
3
+ "version": "0.0.58",
4
4
  "description": "Components to create a generic crud system based on Web Components and Lit",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -31,5 +31,5 @@
31
31
  "publishConfig": {
32
32
  "access": "public"
33
33
  },
34
- "gitHead": "995e1cef5db80dad3e967d4a88b26d19ae37d5cc"
34
+ "gitHead": "ba85531181ff71ecd65c4dc1ed808ee31c3231b9"
35
35
  }