@dile/crud 2.3.1 → 2.3.4
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>` : ''}
|
|
@@ -6,14 +6,18 @@ import '@dile/crud/components/select-ajax-simple/select-ajax-simple.js';
|
|
|
6
6
|
|
|
7
7
|
export class DileCrudFiltersForm extends DileFormChangeDetect(DileForm(LitElement)) {
|
|
8
8
|
static styles = css`
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
:host {
|
|
10
|
+
display: block;
|
|
11
|
+
font-size: var(--dile-crud-filters-label-font-size, var(--dile-input-label-font-size, 1em));
|
|
12
|
+
--dile-select-font-size: var(--dile-crud-filters-select-font-size, var(--dile-select-font-size, 0.875em));
|
|
13
|
+
--dile-input-label-font-size: var(--dile-crud-filters-label-font-size, var(--dile-input-label-font-size, 1em));
|
|
14
|
+
--dile-input-padding: var(--dile-crud-filters-input-padding, var(--dile-input-padding, 5px));
|
|
15
|
+
--dile-input-label-margin-bottom: var(--dile-crud-filters-label-margin-bottom, var(--dile-input-label-margin-bottom, 4px));
|
|
16
|
+
}
|
|
17
|
+
p {
|
|
18
|
+
margin: 0.4rem 0;
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
17
21
|
|
|
18
22
|
static get properties() {
|
|
19
23
|
return {
|
|
@@ -53,6 +57,7 @@ export class DileCrudFiltersForm extends DileFormChangeDetect(DileForm(LitElemen
|
|
|
53
57
|
<dile-select-ajax-simple
|
|
54
58
|
label="${filter.label}"
|
|
55
59
|
name="${filter.name}"
|
|
60
|
+
value="${filter.value || ''}"
|
|
56
61
|
endpoint="${filter.endpoint}"
|
|
57
62
|
displayProperty="${filter.optionLabelField || 'name'}"
|
|
58
63
|
idProperty="${filter.optionValueField || 'id'}"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dile/crud",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.4",
|
|
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.
|
|
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": "
|
|
35
|
+
"gitHead": "645c317c496f3bac9df718ca6e024b9a696edb88"
|
|
36
36
|
}
|