-
Couldn't load subscription status.
- Fork 3.6k
Angular - Abp form field component #23971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new AbpInputComponent as a secondary entry point for the ABP Angular components library, providing a reusable form input component with built-in validation display and localization support.
- Adds a new
AbpInputComponentthat implementsControlValueAccessorfor Angular reactive forms integration - Creates a secondary entry point
@abp/ng.components/abp-inputfor modular imports - Updates TypeScript configuration to support the new component structure
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| npm/ng-packs/tsconfig.base.json | Adds path mapping for the new abp-input secondary entry point |
| npm/ng-packs/packages/components/tsconfig.lib.json | Fixes exclude path for test-setup.ts |
| npm/ng-packs/packages/components/abp-input/src/public-api.ts | Exports the AbpInputComponent for public API |
| npm/ng-packs/packages/components/abp-input/src/lib/abp-input.component.ts | Main component implementation with form integration and validation |
| npm/ng-packs/packages/components/abp-input/src/lib/abp-input.component.html | Template with form controls, labels, and error display |
| npm/ng-packs/packages/components/abp-input/src/index.ts | Re-exports component from lib directory |
| npm/ng-packs/packages/components/abp-input/ng-package.json | Package configuration for Angular library build |
| npm/ng-packs/packages/components/abp-input/README.md | Documentation for the new secondary entry point |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| }); | ||
| } | ||
|
|
||
| writeValue(value: any[]): void { |
Copilot
AI
Oct 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The writeValue method expects an array type (any[]) but the component appears to handle single values based on the template and form control setup. This should be writeValue(value: any): void instead.
| writeValue(value: any[]): void { | |
| writeValue(value: any): void { |
| return [] | ||
| } | ||
| return [] |
Copilot
AI
Oct 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The errors getter always returns an empty array regardless of whether there are actual errors. It should return the actual error messages when this.control.errors exists.
| return [] | |
| } | |
| return [] | |
| return Object.keys(this.control.errors); | |
| } | |
| return []; |
| } | ||
| </div> | ||
| } | ||
| <div></div> |
Copilot
AI
Oct 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty div element serves no purpose and should be removed to keep the template clean.
| <div></div> |
| abpInputFormGroup: FormGroup; | ||
|
|
||
| ngOnInit() { | ||
|
|
Copilot
AI
Oct 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Extra blank line after method declaration should be removed for consistency.
Description
Resolves #23955
Includes