@dile/crud 2.3.1 → 2.3.3

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.
@@ -85,6 +85,7 @@ export class DileSelectAjaxSimple extends DileAxios(DileEmmitChange(LitElement))
85
85
 
86
86
  updated(changedProperties) {
87
87
  if (changedProperties.has('value')) {
88
+ this.selectCurrentValue();
88
89
  this.emmitChange();
89
90
  }
90
91
  }
@@ -141,6 +142,23 @@ export class DileSelectAjaxSimple extends DileAxios(DileEmmitChange(LitElement))
141
142
  e.stopPropagation();
142
143
  }
143
144
 
145
+ /**
146
+ * Clears the select value and resets it to empty.
147
+ * Used by DileForm.clearData() method.
148
+ */
149
+ clear() {
150
+ this.value = '';
151
+ }
152
+
153
+ /**
154
+ * Clears the error state and error message.
155
+ * Used when need to clean error messages from the field.
156
+ */
157
+ clearError() {
158
+ this.errored = false;
159
+ this.message = '';
160
+ }
161
+
144
162
  render() {
145
163
  return html`
146
164
  ${this.label ? html`<label>${this.label}</label>` : ''}
@@ -53,6 +53,7 @@ export class DileCrudFiltersForm extends DileFormChangeDetect(DileForm(LitElemen
53
53
  <dile-select-ajax-simple
54
54
  label="${filter.label}"
55
55
  name="${filter.name}"
56
+ value="${filter.value || ''}"
56
57
  endpoint="${filter.endpoint}"
57
58
  displayProperty="${filter.optionLabelField || 'name'}"
58
59
  idProperty="${filter.optionValueField || 'id'}"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dile/crud",
3
- "version": "2.3.1",
3
+ "version": "2.3.3",
4
4
  "description": "Components to create a generic crud system based on Web Components and Lit",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -25,12 +25,12 @@
25
25
  },
26
26
  "homepage": "https://dile-components.com/",
27
27
  "dependencies": {
28
- "@dile/ui": "^3.6.0",
28
+ "@dile/ui": "^3.6.2",
29
29
  "axios": "^1.19.0",
30
30
  "lit": "^2.7.0 || ^3.0.0"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"
34
34
  },
35
- "gitHead": "b0c3f5a84d5a2682a63009af91427b10e0504c47"
35
+ "gitHead": "c5978f587285d7fd91670ec57f99925c46fb6bd7"
36
36
  }