@elite.framework/ng.core 1.0.47 → 1.0.49
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.
|
@@ -4167,9 +4167,9 @@ class GenericSelectorTypeComponent extends FieldType {
|
|
|
4167
4167
|
});
|
|
4168
4168
|
}
|
|
4169
4169
|
// New method to handle loading the default value from the API
|
|
4170
|
-
onSelect(
|
|
4170
|
+
onSelect(event) {
|
|
4171
4171
|
if (this.props.onSelect) {
|
|
4172
|
-
this.props.onSelect(this.field, { item:
|
|
4172
|
+
this.props.onSelect(this.field, { item: event.value });
|
|
4173
4173
|
this.cdr.detectChanges();
|
|
4174
4174
|
}
|
|
4175
4175
|
}
|
|
@@ -4266,6 +4266,13 @@ class GenericSelectorTypeComponent extends FieldType {
|
|
|
4266
4266
|
}
|
|
4267
4267
|
return fixedFilters || {};
|
|
4268
4268
|
}
|
|
4269
|
+
// Called when dropdown button clicked
|
|
4270
|
+
onDropdownClick(event) {
|
|
4271
|
+
console.log('Dropdown clicked!', event);
|
|
4272
|
+
// ✅ your custom code here
|
|
4273
|
+
// e.g., force trigger search for empty query
|
|
4274
|
+
this.search({ query: '' });
|
|
4275
|
+
}
|
|
4269
4276
|
search(event) {
|
|
4270
4277
|
const q = event.query?.toString().toLowerCase() || '';
|
|
4271
4278
|
const lf = this.to['labelField'] || 'name';
|
|
@@ -4355,6 +4362,8 @@ class GenericSelectorTypeComponent extends FieldType {
|
|
|
4355
4362
|
appendTo="body"
|
|
4356
4363
|
class="w-full rounded-none"
|
|
4357
4364
|
[showEmptyMessage]="true"
|
|
4365
|
+
(onSelect)="onSelect($event)"
|
|
4366
|
+
(onDropdownClick)="onDropdownClick($event)"
|
|
4358
4367
|
emptyMessage="{{ getEmptyMessage() | translate }}"
|
|
4359
4368
|
[showTransitionOptions]="'0ms'" >
|
|
4360
4369
|
<!-- <ng-template let-item pTemplate="item">
|
|
@@ -4367,10 +4376,11 @@ class GenericSelectorTypeComponent extends FieldType {
|
|
|
4367
4376
|
<span>{{ item[to['labelField'] || 'name'] }}</span>
|
|
4368
4377
|
</div>
|
|
4369
4378
|
</ng-template> -->
|
|
4370
|
-
<ng-template let-option #item>
|
|
4379
|
+
<!-- <ng-template let-option #item>
|
|
4371
4380
|
<a (click)="onSelect(option)"> {{option[to['labelField'] || 'name'] }} </a>
|
|
4372
4381
|
</ng-template>
|
|
4373
|
-
|
|
4382
|
+
-->
|
|
4383
|
+
</p-autoComplete>
|
|
4374
4384
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: AutoCompleteModule }, { kind: "component", type: i3.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "minQueryLength", "delay", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "appendTo"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: InputGroupModule }, { kind: "ngmodule", type: InputGroupAddonModule }, { kind: "directive", type: FormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: CheckboxModule }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }] });
|
|
4375
4385
|
}
|
|
4376
4386
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: GenericSelectorTypeComponent, decorators: [{
|
|
@@ -4396,6 +4406,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImpor
|
|
|
4396
4406
|
appendTo="body"
|
|
4397
4407
|
class="w-full rounded-none"
|
|
4398
4408
|
[showEmptyMessage]="true"
|
|
4409
|
+
(onSelect)="onSelect($event)"
|
|
4410
|
+
(onDropdownClick)="onDropdownClick($event)"
|
|
4399
4411
|
emptyMessage="{{ getEmptyMessage() | translate }}"
|
|
4400
4412
|
[showTransitionOptions]="'0ms'" >
|
|
4401
4413
|
<!-- <ng-template let-item pTemplate="item">
|
|
@@ -4408,10 +4420,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImpor
|
|
|
4408
4420
|
<span>{{ item[to['labelField'] || 'name'] }}</span>
|
|
4409
4421
|
</div>
|
|
4410
4422
|
</ng-template> -->
|
|
4411
|
-
<ng-template let-option #item>
|
|
4423
|
+
<!-- <ng-template let-option #item>
|
|
4412
4424
|
<a (click)="onSelect(option)"> {{option[to['labelField'] || 'name'] }} </a>
|
|
4413
4425
|
</ng-template>
|
|
4414
|
-
|
|
4426
|
+
-->
|
|
4427
|
+
</p-autoComplete>
|
|
4415
4428
|
`,
|
|
4416
4429
|
providers: [DialogService, BaseService],
|
|
4417
4430
|
imports: [
|