@sumaris-net/ngx-components 2.4.37 → 2.4.39
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.
- package/esm2020/src/app/shared/form/field.component.mjs +7 -3
- package/fesm2015/sumaris-net.ngx-components.mjs +7 -3
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +6 -2
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/form/field.component.d.ts +1 -1
|
@@ -10196,8 +10196,12 @@ class AppFormField {
|
|
|
10196
10196
|
* @param value
|
|
10197
10197
|
*/
|
|
10198
10198
|
reloadItems(value) {
|
|
10199
|
+
if (!this._definition)
|
|
10200
|
+
return;
|
|
10199
10201
|
this._onDefinitionChanged(this._definition);
|
|
10200
|
-
this.autocompleteField
|
|
10202
|
+
if (this.autocompleteField) {
|
|
10203
|
+
setTimeout(() => this.autocompleteField?.reloadItems(value));
|
|
10204
|
+
}
|
|
10201
10205
|
}
|
|
10202
10206
|
/* -- protected method -- */
|
|
10203
10207
|
computeNumberInputStep(definition) {
|
|
@@ -10247,7 +10251,7 @@ class AppFormField {
|
|
|
10247
10251
|
if (!this.type)
|
|
10248
10252
|
throw new Error('Invalid attribute \'definition\' in <app-form-field>. Missing type !');
|
|
10249
10253
|
this.placeholder = this.placeholder || (this._definition.label && this.translate.instant(this._definition.label));
|
|
10250
|
-
this.required = isNotNilBoolean(this.required) ? this.required : (this._definition.required || this.formControl
|
|
10254
|
+
this.required = isNotNilBoolean(this.required) ? this.required : (this._definition.required || this.formControl?.validator === Validators.required || isBlankString(this.required));
|
|
10251
10255
|
this.disabled = toBoolean(this.disabled, toBoolean(this._definition.disabled, false));
|
|
10252
10256
|
if (this.type === 'double') {
|
|
10253
10257
|
this.numberInputStep = this.computeNumberInputStep(definition);
|