Use PreContribute to fill OriginalValue for VO-derived members from ABP’s scalar PropertyChanges: PreContribute is not bringing any EntityChanges on the context. More assistance required.
Hello. I was able to achieve it this way
/// Custom Menu Filter Component
/// IS TEMPORARY - TO BE REMOVED WHEN FIXED IN FUTURE RELEASE: https://abp.io/support/questions?sort=LastActivityDate-desc&creatorUserId=3a10d34c-87a0-a3f1-8e50-72cd7b2a718f&hidepinnedQuestions=True
@Component({
selector: 'app-custom-menu-filter',
imports: [CommonModule, FormsModule, LocalizationPipe],
standalone: true,
template: `
<div class="lpx-menu-filter">
<i class="bi bi-funnel menu-filter-icon"></i>
<!-- TODO: PROVIDE API -->
<input
class="menu-filter-input hidden-in-hover-trigger"
type="text"
[(ngModel)]="service.menuFilter"
[placeholder]="menuFilterText | abpLocalization"
/>
<span
(click)="service.clearFilter()"
class="menu-filter-clear hidden-in-hover-trigger"
[class.hidden]="!service.menuFilter"
>
<i class="bi bi-x clear-icon"></i>
</span>
</div>
`,
})
export class CustomMenuFilterComponent extends MenuFilterComponent {
override menuFilterText = 'LeptonX::FilterMenu' as SideMenuLayoutTranslate;
}
app.config.ts:
{
provide: CONTENT_BEFORE_ROUTES,
useValue: [CustomMenuFilterComponent],
multi: true,
},
lpx-menu-filter {
display: none !important;
}
sincelpx-menu-filter is not an ReplaceableComponent. If you can share a better wayu to achieve this I would appreciate it. Also I'll be waiting for feedback for when this issue is solved
Thanks, David Simões
Can you exemplify?
It is on angular and is page agnostic, it's on the sidebar layout
The text already exists on localization
The provided solution by @AI-Bot is not suficient
Yes. It is. I've solved it on my current implementation using datatable.recalculateColumns(). Is there a issue open on github?
The issues provided from @AI-Bot are not related to the current ticket.
We have analyzed the source code for ExtensibleTableComponent (specifically the ngOnChanges method where the injector for *ngComponentOutlet is created). We found that the injector provided to the custom component only includes a provider for the PROP_DATA_STREAM token. This token provides anObservable<string> representing the formatted display value of the cell, not the raw record object for the row.
(Reference: ExtensibleTableComponent.ts -> ngOnChanges -> Injector.create({...}) block
// Snippet from ExtensibleTableComponent.ts showing the limited injector creation
if (prop.value.component) {
record[propKey].injector = Injector.create({
providers: [
{
provide: PROP_DATA_STREAM, // Only provides formatted value stream
useValue: value, // 'value' is Observable<string> from getContent
},
// PROBLEM: Missing provider for the 'record' object or a context token
],
parent: this.#injector,
});
record[propKey].component = prop.value.component;
}
Impact: Because the record data is not injected, custom components rendered via the component property cannot access the row-specific data they need to function correctly. This prevents the creation of interactive cell components that depend on row context.
Enhancement Request:
Could the ExtensibleTableComponent be enhanced to provide the row record object (or a context object containing it) to custom components via the injector? The standard approach would be to use a documented InjectionToken (e.g., ROW_RECORD, COMPONENT_CONTEXT, or similar) for this purpose.
// Example of desired injector enhancement
Injector.create({
providers: [
{ provide: PROP_DATA_STREAM, useValue: value },
{ provide: ROW_RECORD, useValue: record } // <-- Requesting this
],
parent: this.#injector,
});
This would allow developers to build stateful, interactive components that integrate properly with the table row data, significantly enhancing the extensibility of the table.
I've created an issue on ABP repository regarding this situation: https://github.com/abpframework/abp/issues/22555
We also observed some difficulty in reliably setting very narrow fixed column widths (e.g., 10-30px) using columnWidth when a custom component is rendered, although wider widths seem to apply correctly. This might be a separate minor issue related to CSS or internal calculations.
What if I need the checkbox to appear before the actions column?