init
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<!-- <uikit-field label="" [control]="control" [showLabel]="showLabel" [showErrors]="showErrors">
|
||||
<p-select
|
||||
[loading]="loading()"
|
||||
[options]="items()"
|
||||
[optionLabel]="optionLabel"
|
||||
[optionValue]="selectOptionValue"
|
||||
[placeholder]="placeholder"
|
||||
[formControl]="control"
|
||||
[showClear]="showClear"
|
||||
[filter]="true"
|
||||
appendTo="body"
|
||||
>
|
||||
@if (canInsert) {
|
||||
<ng-template #footer>
|
||||
<div class="p-3">
|
||||
<p-button
|
||||
[label]="addCtaLabel"
|
||||
fluid
|
||||
severity="secondary"
|
||||
text
|
||||
size="small"
|
||||
icon="pi pi-plus"
|
||||
(onClick)="onOpenForm()"
|
||||
/>
|
||||
</div>
|
||||
</ng-template>
|
||||
}
|
||||
</p-select>
|
||||
@if (canInsert) {
|
||||
<ng-content></ng-content>
|
||||
}
|
||||
</uikit-field> -->
|
||||
@@ -0,0 +1,33 @@
|
||||
// import { Maybe } from '@/core';
|
||||
// import { UikitFieldComponent } from '@/uikit';
|
||||
// import { Component, EventEmitter, Input, model, Output, signal } from '@angular/core';
|
||||
// import { FormControl, ReactiveFormsModule } from '@angular/forms';
|
||||
// import { Button } from 'primeng/button';
|
||||
// import { Select } from 'primeng/select';
|
||||
// import { Observable } from 'rxjs';
|
||||
|
||||
// export interface ISelectItem {
|
||||
// id: number;
|
||||
// name: string;
|
||||
// }
|
||||
|
||||
// @Component({
|
||||
// selector: 'uikit-select-field',
|
||||
// templateUrl: 'select-field.component.html',
|
||||
// imports: [UikitFieldComponent, Select, Button, ReactiveFormsModule],
|
||||
// })
|
||||
// export class SelectComponent<T = ISelectItem, serviceResponse = T[]> extends AbstractSelectComponent<T, serviceResponse> {
|
||||
// @Input() control = new FormControl<Maybe<number | T>>(null);
|
||||
// @Input() canInsert: boolean = false;
|
||||
// @Input() showLabel: boolean = true;
|
||||
// @Input() showErrors: boolean = true;
|
||||
// @Input() showClear: boolean = true;
|
||||
// @Input() isFullDataOptionValue: boolean = false;
|
||||
// @Input() optionValue = 'id';
|
||||
// @Input() optionLabel: string = 'name';
|
||||
// @Input() label!: string;
|
||||
// @Input() placeholder!: string;
|
||||
// @Input() addCtaLabel: string = 'ایجاد مورد جدید';
|
||||
// @Output() onChange = new EventEmitter<Maybe<T>>();
|
||||
// @Output() onSetDefaultDataItem = new EventEmitter<T>();
|
||||
// }
|
||||
Reference in New Issue
Block a user