Can you give an example for CustomMultiSelectComponent
?
I'm working with the abp-extensible-table
component and have a requirement to allow users to select multiple lines from it within a specific column. Currently, it seems like it doesn't support it.
Could you please provide guidance or suggest a way to implement a multi-select within a column of the abp-extensible-table? Any examples or best practices for achieving this would be greatly appreciated.
Hello, thank you for reporting this issue.
However, I am unable to see your HTML code properly. Could you please resend it?
Hi. I updated the question with the HTML code.
Created an component with the following HTML using abp-extensible-form:
<ng-template #abpBody>
<ng-template #loaderRef>
<div class="text-center"><i class="fa fa-pulse fa-spinner"></i></div>
</ng-template>
<form [formGroup]="form" (ngSubmit)="save()" [validateOnSubmit]="true">
<abp-extensible-form [selectedRecord]="selected"></abp-extensible-form>
</form>
</ng-template>
And with the following typeahead defined on defaults:
{
type: ePropType.Typeahead,
name: 'myProp',
id: 'myProp',
displayName: '::MyField',
validators: () => [Validators.required],
options: (data, params) => {
const service = data.getInjected(MyService);
return service
.getList({
filter: params ?? '',
maxResultCount: params?.maxResultCount,
skipCount: params?.skipCount,
} as MyInput)
.pipe(
map(pagedResult => {
return pagedResult.items.map(
item =>
({
key: item.displayName,
value: item.id,
})
);
})
);
},
}
When creating a new record everything works fine, but when I patch a value to the form wich contains myProp
correctly defined and with a valid value the typeahead component don't autofill that value, even when trying to force it through form. I don't have this problem with abp-lookup-typeahead
components in forms created manually through HTML.
Here's my buildform method
buildForm() { const data = new FormPropData(this.injector, this.selected); this.form = generateFormFromProps(data); }
Thanks in advance for any help provided.